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?

link|improve this question

0% accept rate
1  
I have no idea what you're asking. Could you clarify? Also, FTP Must Die. – ErikA Jan 30 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? – ErikA Jan 30 at 4:52
By "paste", I believe you actually mean "path". Is this correct? – ErikA Jan 30 at 5:03
Yes. You this correct. – gustavosiq Jan 30 at 5:25
When the user enter the ftp, they access the path /var/lib/tomcat/webapps/ROOT – gustavosiq Jan 30 at 5:26
feedback

1 Answer

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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