FTP User with vsftpd

Posted June 2, 2019 3.6k views
ApplicationsDebian 9

I did as was recommended in this post and reading some other tutorials but it’s not working, I have 2 users, one with sudo access, it’s my regular account, and then I’ve created another one for a friend, just for FTP access.He can log in and he can’t go to my regular account’s home directory,But he can go to higher levels,If someone can help me out i really appreciate it,Thanks in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Linux by default will restrict non-sudo access to another user’s home directory. I can’t imagine what your trying to achieve will work based on the small amount of info I could glean from your question.

You either need to move the folder that he is trying to access to somewhere else on the server (outside of user’s home directories) and configure it appropriately with vsftpd, or if there isn’t an urgent need. You may be able to restrict your friends FTP access to his own home directory (as the tutorial seems to do) and then use a seperate script (maybe run by CRON) to check for uploaded files every few minutes and move them into the location you need them.

  • First of all thank you for the comment,Yeah this part is okay “ Linux by default will restrict non-sudo access to another user’s home directory. ” but this same ftp account i’ve created can go to root directory,so i’ve did create the vsftpd.conf According to the tutorial but still same result,Maybe there is another fault in the conf file which im not aware of,i logged in with the new ftp account i’ve created and this is when i try to go to my main account’s directory
    and this is fine,Exactly what i wanted.and this is when the same account can go to higher which is exactly what i want to avoid.This is my vsftpd.conf