[Case 46326] Rearrange an Account does not alter home directory path of FTP users

mikelegg

Well-Known Member
Mar 29, 2005
330
1
166
I've just added a new hdd to a server and started migrating accounts to the new drive using the "Rearrange Accounts" function. (cPanel 11.28)

Everything appears to be working OK, but I notice there is still a copy of the migrated account files in /home. Is there a reason why the files are left there and can I safely delete them?

Also I notice that the disk usage for the migrated accounts on the new drive is reported as 0Mb - will this be updated on the next statistics run?
 

mikelegg

Well-Known Member
Mar 29, 2005
330
1
166
I ran "Initial Quota Setup" and correct disk usage is now showing.

I've also deleted the old files from /home without causing any problems.
 
Last edited:

mikelegg

Well-Known Member
Mar 29, 2005
330
1
166
Oops ... just noticed a new problem. users can no longer FTP into their accounts. They get the error "421 Home directory not available - aborting".
 

mikelegg

Well-Known Member
Mar 29, 2005
330
1
166
I notice when I'm rearranging accounts the screen says "Editing proftpd.conf entry", but I'm running PureFTP not ProFTP.

I wonder if this is why customers can't login via FTP after their account has been moved - the PureFTP setings haven't been updated to use the new location.
 

mikelegg

Well-Known Member
Mar 29, 2005
330
1
166
I worked out how to manually fix each account after it's been moved.

Manually edit /etc/proftpd/[username] and give it to the correct folder location.

So it looks like the "Rearrange Accounts" function isn't doing this for some reason.
 

JawadArshad

Well-Known Member
PartnerNOC
Apr 8, 2008
459
6
68
PK
cPanel Access Level
DataCenter Provider
I believe pure-ftpd uses /etc/pure-ftpd.conf and not proftpd.conf.

He he.. you made a tutorial out there :D

Pure-ftpd uses the same proftpd.conf, also vftpd.conf links to proftpd.conf.

Did you try FTP after rearranging and before deleting old homedirs? Just curious as this can clear some things.

Vijay
 

mikelegg

Well-Known Member
Mar 29, 2005
330
1
166
I believe pure-ftpd uses /etc/pure-ftpd.conf and not proftpd.conf.
Yes, that's correct. But it uses /etc/proftpd/[username] for individual account settings.

The problem is that the Rearrange Accounts function isn't updating these files with the new location. Therefore FTP access stops working for the rearranged accounts. Once the files are edited manually FTP access works again.
 

mikelegg

Well-Known Member
Mar 29, 2005
330
1
166
Getting back to the first "problem" that I encountered ... it has been pointed out to me that the files in /home are actually symlinks to /home2. So the problem lies with me not cPanel. :-X

The only problem that I think cpanel has is /etc/proftpd/[username] isn't being updated to /home2
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Getting back to the first "problem" that I encountered ... it has been pointed out to me that the files in /home are actually symlinks to /home2. So the problem lies with me not cPanel. :-X
I believe the symbolic link (symlink) would exist at a path like /home/$username, where if the account was moved to /home2, the target of the symlink should point to /home2/$username/.

The only problem that I think cpanel has is /etc/proftpd/[username] isn't being updated to /home2
I believe you are right as that sounds like an issue that may need to be addressed; has this been reported in a support ticket? If not, please submit a bug report so that we can gather verbose detail about the circumstances involved. When available, please post your ticket ID number so that we may follow-up internally.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Hi Don

I've submitted a bug report, the Request ID is: 1163269
Thank you; your bug report is very much appreciated. I will keep this thread updated with available news, including any relevant case numbers that may be used when referencing change log updates.
 
Last edited:

mikelegg

Well-Known Member
Mar 29, 2005
330
1
166
The word from the techs is that this is the expected behaviour.

Because symlinks are added which point /home/[username] to /home2/[username] the original /etc/proftpd/[username] settings will still work and don't need to be updated.

If (like me) you do some housekeeping and delete the symlinks, you then need to update the /etc/proftpd/[username] config files to point to the new /home2 locations.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
The word from the techs is that this is the expected behaviour.

Because symlinks are added which point /home/[username] to /home2/[username] the original /etc/proftpd/[username] settings will still work and don't need to be updated.

If (like me) you do some housekeeping and delete the symlinks, you then need to update the /etc/proftpd/[username] config files to point to the new /home2 locations.
It is correct that preservation of the symlink will ensure FTP access remains intact and functional. For change log tracking purposes, the internal inquiry that was created on your behalf has been assigned as case 46326; this case will be used to track any future enhancements or changes that may occur in regard to ensuring virtual FTP users use the new home directory path without having to rely upon the symbolic link in the file system.

I have revised the thread title to include the internal case number and a brief description of the issue involved. While the official cPanel & WHM Change Log is the primary source to confirm when a change is published, you may also submit a support request if you are experiencing any other difficulty that may be related or to inquire about the status of the case in the future.

To clarify and reiterate, for anyone reading, FTP access will remain functional and work without issue provided that the symbolic link, created by WHM, is preserved so that the original home directory path can still point to the new location.
 
Last edited: