IN THIS ARTICLE
- Outlines how to specify 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, you now have the option to specify the POSIX mode bits that get set when an SMB user creates a new file or directory.
These will be the new default permissions that get applied to a new directory or file created by SMB writers that does not have any inheritable permissions from its parent's ACL - If ACL inheritance exists, this option will have no effect.
Note that this option is only available via the qq CLI and the REST API. Here’s an example to get you started.
Let’s say you want to create an SMB share "users" where new files and directories get created with 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 then return the following:
If these arguments are left unspecified, the default_file_create_mode will be 644 and the default_directory_create_mode will be 755.
You can also use the same arguments with qq smb_mod_share to modify an existing share. Let’s say you’ve already created the “users” share with the default settings. First, you’ll need to get the ID of the share by listing all shares.
You’ll get a list of all the shares on the system.
Above you can see that the ID of the users share is 14, so we’ll use that ID to modify the share.
qq smb_mod_share --id 14 --default-file-create-mode 777
This will output the following:
Once these settings are applied, clients will need to remount the share for the changes to take effect.
You should now be able to set the default POSIX permissions for SMB shares using the above commands.
Like what you see? Share this article with your network!