SFTP file download and upload permission

I have folder /sftp/xyz, need to give download and upload permission for ‘xyz’ folder for user ‘abc’.

User ‘abc’ should access only the folder /sftp/xyz.

I tried so many things but now the user ‘abc’ is able to access /home/, /sftp/ also able to edit files. Please help.

Answer

This is because user abc has a home directory in /home, so they implicitly have access to that directory. If you want that user to only have access to /sftp/xyz, then make that their home directory and remove permissions to every other directory.

Using ACLs (Access Control Lists) is another option, but not recommended because they are definitely not necessary in this situation.

Attribution
Source : Link , Question Author : Vinay S , Answer Author : Tim S.

Leave a Comment