Results 1 to 5 of 5

Thread: Umask for shared folders

  1. #1
    Join Date
    Jul 2009
    Beans
    69
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Umask for shared folders

    Hello.

    Quite a common question, but did not google a solution after a couple of days.

    I want to share a folder, and I want everybody with access to the folder (managed by groups) to be able to add, modify and delete files. All files of the folder. So someone should be able to delete a file dropped by someone else. That means that any new created files or folders should have a specific authorization status, like 661.

    I guess ACLs should do the job ... but I'm still thinking a simple solution could exist.

    Does anybody has an idea ?

    Thank you in advance for your help !

  2. #2
    Join Date
    Jan 2008
    Location
    USA
    Beans
    971
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Umask for shared folders

    Code:
    setfacl -d -m mask:007 /path/to/shared/folder
    That will allow the GROUP all permissions to newly created files in that folder. If you want to also include sub-folders within that directory, be sure to add the -R flag to the above command.

    Now, you need to make sure the right group is assigned to the directory:

    Code:
    chgrp <group name> /path/to/shared/folder
    Then set sgid bit:

    Code:
    chmod g+s /path/to/shared/folder

  3. #3
    Join Date
    Jun 2009
    Location
    0000:0400
    Beans
    Hidden!

    Re: Umask for shared folders

    In order for the above to work, you'll need to add 'acl' to that partition's options in /etc/fstab.

  4. #4
    Join Date
    Jul 2009
    Beans
    69
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Umask for shared folders

    Excellent !! Thank you both of you for the help. This is precisely what I wanted to do !!

    And for the fstab, that's right, if the option is not added, the following error message is displayed :

    Code:
    emma@box:/$ setfacl -d -m mask:007 /path/to/shared/folder
    setfacl: /path/to/shared/folder: Operation not supported
    Thank's again.

  5. #5
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    177
    Distro
    Lubuntu 12.04 Precise Pangolin

    Re: Umask for shared folders

    I hope not to be wrong in saying that if you don't want to edit /etc/fstab file,
    which is not so easy and you can create yourself many troubles,
    you can always remount the partition in which the folder is contained with acl specified

    Code:
    sudo mount -o remount,acl /partition_containing_your_folder
    At least it worked for me

    Cheers

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •