0

I would like to give an FTP user permission to write in a folder but should not be able to alter other files in the folder or sub folder in the main folder.

I have a root account, we are using the web server to run from /home/usera --> the default www path.

Now we have a user account whom we will give FTP access to upload files in /home/usera but do not want him to change or go into the other folder present in /home/usera.

1

I think you'll need to change ownership of the files/folders which usera is not allowed to change. And set permissions accordingly. You can set permission on 3 levels:

owner group everyone

You might want to look here: http://www.zzee.com/solutions/unix-permissions.shtml.

However, I believe the normal situation is, that usera has ownership of the files and folders in his own home directory.

  • /home/usera is the main path, i do not want userb to go into the subfolder in /home/usera but he need to have permission to upload in the main folder which is /home/usera – Zeeshan Jan 2 '13 at 12:09
  • Ok. So just in order to achieve what you want: if usera owns all files and folders contained in /home/usera, then you could set permission so that only usera can read/write/execute (what you prefer). But for the /home/usersa folder itself, you'll need to set permission so that userb can read/write/execute. – Vering Jan 2 '13 at 12:25
0

I think you can use sticky bit in this case.

http://computernetworkingnotes.com/managing-file-system-security/sticky-bit.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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