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.

j0k
  • 401
  • 9
  • 16
Zeeshan
  • 1
  • 1

2 Answers2

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.

Vering
  • 111
  • 5
  • /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 02 '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 02 '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

Suku
  • 2,006
  • 13
  • 15
  • One more example : [http://www.thegeekstuff.com/2011/02/sticky-bit-on-directory-file/](http://www.thegeekstuff.com/2011/02/sticky-bit-on-directory-file/) – Suku Jan 02 '13 at 12:19