Search This Blog

Wednesday, August 21, 2013

VSFTP give each user different directory than home directory

Usually when you create user for vsftp, it will go to it's own home folder.

Like user: mds
Home Folder: /home/mds

To change this, What you need to use is a combo of user_config_dir and local_root.
In the main config file /etc/vsftpd/vsftp.conf you have an entry like:


chroot_local_user=YES
user_config_dir=/etc/vsftpd/users


Inside that directory (/etc/vsftpd/users) you have a config file with the same name as the user (/etc/vsftpd/users/mds), and inside that file you have:


local_root=/var/www/sites/
dirlist_enable=YES
download_enable=YES
write_enable=YES


Then the user will be direct to /var/www/sites/ through ftp.
But ssh login folder will not change.

Don't forget remove the [local_root] in the main config file /etc/vsftpd/vsftp.conf.

2 comments:

  1. I updated to the latest version, and now it keeps on coming up with that tab whenever i startup firefox. What should i do?. I have updated it, there is a tab saying that i have, that is the problem. It is telling me all of the new features that this version offers and everything..

    ReplyDelete
  2. I want to create a custom Wordpress theme, but I don't have administrative access to the computer that I'm using, so I can't install Wordpress to test my theme. Is there another easy way to do it? I have photoshop, and notepad ++ both installed on my flash drive, but as far as I know there is no way to install Wordpress on a flash drive..

    ReplyDelete