2

I could use some help setting permissions for a series of shared folders. Say I have the following three folders:

/xfer/joe
/xfer/bob
/xfer/sam

Joe should be able to read, write and delete files from /xfer/joe, and list, write but not read files from /xfer/bob and /xfer/sam. Likewise, Bob should be able to read, write, delete files from /xfer/bob, but only list and write (not read) from /xfer/joe and /xfer/sam.

I can chmod and chown the folders, but how to set up so if Bob drops a file into Joe, Joe retains ownership of the file.

The users will sftp files in and out of the folders.

  • You probably do not mean "write" but "create new files"? Since writing to a file means being able to append and remove content from a file ... and thus also includes deleting and reading (when someone can write a file he can empty it and so can delete contents of it; effectively removing it except for the file name itself). – Rinzwind Apr 02 '13 at 07:11
  • Also: you did not specify how these shares are set up. IF this is through FTP or Samba you might need to set permissions in the config file that comes with that software. – Rinzwind Apr 02 '13 at 07:20

1 Answers1

1

Have a look at ACL. It is capable of creating more refined permissions than chown/chmod.The Eiciel package allows GUI access to ACLs through the Nautilus file manager.

enter image description here

  • setfacl - set file access control lists
  • getfacl - get file access control lists
Rinzwind
  • 299,756
  • Also see: http://askubuntu.com/questions/52584/shared-folders-for-all-users for command line ACL setup. – Takkat Apr 02 '13 at 09:30