IN THIS ARTICLE
Outlines how to set the default POSIX permissions for SMB shares
- Qumulo Core 2.5.1 or above for Windows
- Qumulo Core 2.5.2 or above for Mac
- Command line (CLI) tools installed via API & Tools tab
In Qumulo Core 2.5.1, we’ve introduced some additional flexibility for customers that have both NFS and SMB users accessing the same files. For each SMB share, the option is now available to specify the POSIX mode bits set when an SMB user creates a new file or directory.
The default POSIX mode bits control the behavior of Qumulo when setting permissions on objects written over SMB into a directory that does not contain any pre-existing inheritable ACLs. In other words, "In the absence of pre-existing inheritable permissions, apply these default permissions." This is roughly comparable to the umask setting in POSIX environments.
NOTE: The default permissions applied to a new directory or file created by SMB writers do not have any inheritable permissions from its parent's ACL. If ACL inheritance exists, this option will have no effect.
Create an SMB share
In the example below, an SMB share users is added that assigns new files and directories POSIX permissions that give full rwx access for everyone (777)
qq smb_add_share --name users --fs-path /users --default-file-create-mode 777
The above command will return the following:
NOTE: If arguments are left unspecified, the default_file_create_mode will be 644 and the default_directory_create_mode will be 755.
Modify an existing SMB share
To modify an existing SMB share using the same arguments above, the share ID will be utilized in the qq command. Retrieve the ID of the share by running the following command to list all SMB shares:
Output will return a list of all shares and their settings, including the share ID:
In the above example, the ID of the users share is 14 which can be used in the qq modify command to change the share permissions:
qq smb_mod_share --id 14 --default-file-create-mode 777
Running the above command outputs the following:
NOTE: Once settings are applied, clients will need to remount the share for the changes to take effect.
You should now be able to successfully set the default POSIX permissions for SMB shares
Like what you see? Share this article with your network!