Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I determine the path the user logs in on FTP (VSFTP)? The user should only be able to access a specific path via FTP.

For example: The user can access only the path /var/lib/tomcat/webapps/ROOT. How do I configure this?

share|improve this question
1  
I have no idea what you're asking. Could you clarify? Also, FTP Must Die. –  EEAA Jan 30 '12 at 4:30
    
Are you asking how you can give users access to /var/lib/tomcat/webapps/ROOT or perhaps how you can chroot them there? –  EEAA Jan 30 '12 at 4:52
    
By "paste", I believe you actually mean "path". Is this correct? –  EEAA Jan 30 '12 at 5:03
    
Yes. You this correct. –  gustavosiq Jan 30 '12 at 5:25
    
When the user enter the ftp, they access the path /var/lib/tomcat/webapps/ROOT –  gustavosiq Jan 30 '12 at 5:26

1 Answer 1

Try to configure your FTP server in chroot/jail environment.

edit /etc/vsftpd/vsftpd.conf

chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/vsftpd.chroot_list
passwd_chroot_enable=yes

Now, to file /etc/vsftpd/vsftpd.chroot_list simply add name of user user1.

Change your user default home directory or you can also bind your access path with home directory of user.

usermod -d /var/lib/tomcat/webapps/ROOT user1

or

mount --bind /var/lib/tomcat/webapps/ROOT /home/user1

/etc/init.d/vsftpd restart

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.