Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Inherited Folder's access permissions

  1. #11
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Inhited Folder's access permissions

    Quote Originally Posted by mbnoimi View Post
    Thanks, this works for SAMBA


    I'm still missing it. I want to inherit the parent folder permissions and owner too... Any suggest?
    In post #6 and in #8 I gave you the answer. It appears that you can't set it GUID using the GUI interface. This doesn't make much sense but it appears to so. The use of the SGUID bit is the correct way. You will have to do this using the terminal (CLI). Are you doing this on a test share without too many files? Do we need to do this recursively over many subdirectories of files?
    -BAB1

  2. #12
    Join Date
    Dec 2009
    Beans
    5,419

    Re: Inhited Folder's access permissions

    Quote Originally Posted by mbnoimi View Post
    Thanks, this works for SAMBA
    I'm still missing it. I want to inherit the parent folder permissions and owner too... Any suggest?
    Unless you use something like bindfs you cannot inherit ownership since the setuid bit on a directory has no meaning in Linux - only in BSD.

    Through a combination of umask and the setgid bit you can cause new child files and folders to inherit the group ID and group permissions of the parent.

    The only problem with setgid in this topic and something that still baffles me is that the parent folder whose permissions you want to inherit always starts off the same way:

    Owner = mbnoimi

    Owner permissions = read / write / execute
    Group permissions = none
    Other permissions = none
    In octal mode these are permissions of 700. Why do you want all child files and folders to have permissions of 700?

    You want just the opposite to happen. Maybe if I restate bab1's posts a different way it will help:

    ** Change ownership of the parent folder to include a new group ( I'm going to use plugdev since it already exists ):
    Code:
    sudo chown mbnoimi:plugdev /parent-folder
    ** Change permissions to 770 instead of 700 and add the setgid bit to the parent folder:
    Code:
    sudo chmod 2770 /parent-folder
    ** Add all the users you want to access that folder to the plugdev group:
    Code:
    sudo gpasswd -a user-name plugdev
    ** Since you are using Kubuntu 12.10 the umask is already set at 002 so no change is required to that.

    Any new file copied to or created in but not moved to the parent folder will have group = plugdev and permissions of 664. All members of the plugdev group will be able to read and write to that file.
    Last edited by Morbius1; May 23rd, 2013 at 01:25 PM.

  3. #13
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Inhited Folder's access permissions

    Quote Originally Posted by Morbius1 View Post
    Unless you use something like bindfs you cannot inherit ownership since the setuid bit on a directory has no meaning in Linux - only in BSD.
    The suid bit has the same meaning in both Linux and BSD. Namely: setuid and setgid is short for "set user ID upon execution" and "set group ID upon execution". Inheritance is not an explicit function of the suid or sgid bit with UNIX or Linux. Setting the primary group is the only method that I know of to explicitly set group inheritance.
    -BAB1

  4. #14
    Join Date
    Dec 2009
    Beans
    5,419

    Re: Inherited Folder's access permissions

    The suid bit has the same meaning in both Linux and BSD.
    At a file level we are in agreement but I was specifically talking about how setuid in BSD differs from Linux on directories. In BSD:
    (the setuid bit).
    Executable files with this bit set will run with effective uid set to the uid of the file owner.
    So far this is exactly the same as Linux.

    Directories with this bit set will force all files and sub-directories created in them
    to be owned by the directory owner and not by the uid of the creating process.
    In Linux the setuid bit on directories is ignored.
    Setting the primary group is the only method that I know of to explicitly set group inheritance.
    With the exception of bindfs we are in agreement which is why all I did was take your previous posts and rearrange the words a bit

Page 2 of 2 FirstFirst 12

Tags for this Thread

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
  •