How to change the FTP user’s path in cPanel

How to change the FTP user path in cPanel

By default cPanel does not allow you to change the FTP path for your main account or sub-accounts, after creating the domain. But you can easily change it from the FTP user configuration files. Each cPanel user has a file in /etc/proftpd (yes, even if you use pure-ftp)

# cat /etc/proftpd/user
user:$1$vAYD1RJQ$U7pJmHJvT5dFL.kzoJ8f6/:509:508::/home/user:/bin/ftpsh
user_logs:$1$vAYD1RJQ$U7pJmHJvT5dFL.kzoJ8f6/:509:508:user:/home/.domlogs/user:/bin/ftpsh

As you can see, /etc/proftpd contains a file for each of the accounts on the server. Edit the file for the domain, and change the home directory.

user:$1$vAYD1RJQ$U7pJmHJvT5dFL.kzoJ8f6/:509:508::/home/user/myfiles:/bin/ftpsh

After editing save the file and then restart your pure-ftpd service
=-=-=-=–=-

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s