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

Thread: ZFS, samba, acls

  1. #11
    Join Date
    Apr 2008
    Beans
    33

    Re: ZFS, samba, acls

    I have, actually, solved my problem. I was trying to create a share using smb.conf but ended up using "zfs set sharesmb=true pool". I have another problem now though. When I create a file in some samba directory from windows box file has owners user_a:user_a. Thus other clients (let's say I have a linux group "users" for them) can't access these files. I'd like to know how can I make new files and folders to inherit either owner or group property from parent directory?

  2. #12
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: ZFS, samba, acls

    Quote Originally Posted by OnlyWhisky View Post
    I have, actually, solved my problem. I was trying to create a share using smb.conf but ended up using "zfs set sharesmb=true pool". I have another problem now though. When I create a file in some samba directory from windows box file has owners user_a:user_a. Thus other clients (let's say I have a linux group "users" for them) can't access these files. I'd like to know how can I make new files and folders to inherit either owner or group property from parent directory?
    The traditional way is to use sgid for groups and not worry about the owner. If you really had to set the owner you can use suid. I do something like this when I do this for EXT file systems; Create the directory (e.g. /tank/share) and set the owner:group (chown root:users /tank/share) then use chmod to set the sgid bit (chmod 2775 /tank/share). The 2 is the sgid bit. Now every subdirectory and file will have the group owner as "users".

    You might have problems with umask. All of the latest Ubuntu versions have a umask of 0002 and thus permissions of 775 for the directories and 664 for the files. This allows the group to have rw access. Some Linux distros have a umask of 0022 and therefore have permissions of 755:644. This yields ro access for groups. So umask needs to be set to 0002 for this to work. In addition, I always added the correct mask in the smb.conf to account for Windows users.

    Here is the Oracle man page for the suid and sgid and the "sticky bit":
    http://docs.oracle.com/cd/E19683-01/...-69/index.html

    Here is the page on umask:
    http://docs.oracle.com/cd/E19683-01/...-62/index.html
    -BAB1

  3. #13
    Join Date
    Apr 2008
    Beans
    33

    Re: ZFS, samba, acls

    Quote Originally Posted by bab1 View Post
    The traditional way is to use sgid for groups and not worry about the owner. If you really had to set the owner you can use suid. I do something like this when I do this for EXT file systems; Create the directory (e.g. /tank/share) and set the owner:group (chown root:users /tank/share) then use chmod to set the sgid bit (chmod 2775 /tank/share). The 2 is the sgid bit. Now every subdirectory and file will have the group owner as "users".

    You might have problems with umask. All of the latest Ubuntu versions have a umask of 0002 and thus permissions of 775 for the directories and 664 for the files. This allows the group to have rw access. Some Linux distros have a umask of 0022 and therefore have permissions of 755:644. This yields ro access for groups. So umask needs to be set to 0002 for this to work. In addition, I always added the correct mask in the smb.conf to account for Windows users.

    Here is the Oracle man page for the suid and sgid and the "sticky bit":
    http://docs.oracle.com/cd/E19683-01/...-69/index.html

    Here is the page on umask:
    http://docs.oracle.com/cd/E19683-01/...-62/index.html
    Thank you for great advice and comprehensive explanation! It helped a lot!

    I actually switched back to smb.conf from zfs sharesmb. Instead of umask I'm using following flags (I wasn't able to verify which one does the trick):

    Code:
       [myshare]
       map acl inherit = yes
       inherit permissions = yes
       inherit acls = Yes

Page 2 of 2 FirstFirst 12

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
  •