Authorization and Access Management
Share Permissions
Share permissions are the primary method for controlling access to shares. Configured at the share level, they apply uniformly to all files and directories within the share. While share permissions provide a simple way to manage access, they lack the granularity of more advanced access control mechanisms.
Permissions can be configured in the configuration file or with the CLI when adding or updating shares by specifying the relevant parameters.
Setting Permissions on a Share Using the Configuration File
In the relevant[share]
section of the configuration file for the share you want to configure, set the permissions
parameter to the desired value, similar to the following example:
[share]
netname = MyShare
path = /export/share
permissions = everyone:full
[/share]
Adding a Share with Permissions Using the CLI
When adding a share using the CLI, you can specify the permissions using the -P
or --permissions
parameter. For example:
sudo tsmb-cfg share add -n MyShare -p /export/share -P everyone:full
Updating a Share's Permissions Using the CLI
To update a share's permissions using the CLI, use the tsmb-cfg share update
command with the -P
or --permissions
parameter. For example:
sudo tsmb-cfg share update -n MyShare -P everyone:read
Security Descriptors
Security descriptors provide more granular control over share access than standard permissions. Administrators can use SDDL (Security Descriptor Definition Language) strings to define detailed access rules, specifying who can access a share and what actions they can perform based on a wide range of criteria and attributes.
Security descriptors can be configured in the configuration file, and using the CLI when adding or updating shares by specifying the relevant parameter.
Setting Security Descriptors on a Share Using the Configuration File
In the relevant[share]
section of the configuration file for the share you want to configure, set the security_descriptor
parameter to the desired value, similar to the following example:
[share]
netname = MyShare
path = /export/share
security_descriptor = O:SYG:SYD:(A;;FA;;;WD)
[/share]
Adding a Share with Security Descriptors Using the CLI
When adding a share using the CLI, you can specify the security descriptor using the --security-descriptor
parameter. For example:
sudo tsmb-cfg share add -n MyShare -p /export/share --security-descriptor "O:SYG:SYD:(A;;FA;;;WD)"
Updating a Share's Security Descriptors Using the CLI
To update a share's security descriptors using the CLI, use the tsmb-cfg share update
command with the --security-descriptor
parameter. For example:
sudo tsmb-cfg share update -n MyShare --security-descriptor "O:SYG:SYD:(A;;FA;;;WD)"
File Security Mode
The file security mode is a global setting that controls how Fusion File Share Server handles file permissions. For each share, you can choose one of the following three modes:
- Windows: In Windows mode, Fusion File Share Server stores and enforces file permissions based on Windows ACLs. This is the default mode, and it conforms to the behavior expected by Windows clients.
- POSIX:
In POSIX mode, Fusion File Share Server stores and enforces file permissions based on the connected user's UID/GID (see POSIX ID Mapping) and the file's mode bits (i.e., the standard UNIXrwx
permissions). - None:
In None mode, Fusion File Share Server does not enforce file permissions, making all files accessible to users according to the share permissions.
Windows Security Mode
The Windows security mode makes Fusion File Share Server behave like a Windows server when authorizing access to files:
- Fusion File Share Server stores the ACL for each file created on a share, according to the ACL storage settings.
- Upon file access, Fusion File Share Server checks the the file's ACLs, to determine the permissions, based on the the user's SIDs provided by the domain controller during authentication.
If extended attributes are not supported on the shared file's path, Fusion File Share Server will attempt to determine the file's security descriptor by reading the parent directory's security descriptor, recursively up to the share's root. If the share's root directory lacks a security descriptor, Fusion File Share Server will use the other bits of the share root's mode (interpreted as the Everyone group) to authorize access to the file.
POSIX Security Mode
The POSIX mode disregards any ACLs stored on the files, and does not store ACLs for new files.
When authorizing access, Fusion File Share Server considers only the file's mode bits (i.e., the standard UNIX rwx
permissions), and the UID/GID of the connected user, as determined by the POSIX ID Mapping settings. Access is then authorized according to the standard UNIX permissions model:
- If the user's UID matches the file's owner UID, the user's access is determined by the owner bits.
- If the user's UID does not match the file's owner UID, but the user's GID matches the file's group GID, the user's access is determined by the group bits.
- If the user's UID and GID do not match the file's owner UID and group GID, the user's access is determined by the other bits.
Unlike with the Windows mode, Fusion File Share Server does not check the parent directory's permissions when determining access to a file.
None Security Mode
In this mode, no access permission checks are performed on files. Access is determined by the share permissions.
Creating a Share with a Specific Security Mode Using the Configuration File
In the relevant[share]
section of the configuration file for the share you want to configure, set the security
parameter to the desired value, similar to the following example:
[share]
netname = MyShare
path = /export/share
security = posix
[/share]
Adding a Share with a Specific Security Mode Using the CLI
When adding a share using the CLI, you can specify the security mode using the -S
or --security
parameter. For example:
sudo tsmb-cfg share add -n MyShare -p /export/share -S posix
Hiding Shares
Fusion File Share Server allows you to mark shares as hidden. Hidden shares are not listed when browsing the server, but users with the share's name and proper permissions can still access them.
Hidden shares can be configured in the configuration file, and using the CLI when adding or updating shares by specifying the relevant parameter.
Hiding a Share Using the Configuration File
In the relevant[share]
section of the configuration file for the share you want to configure, set the hidden
parameter to true
to hide the share, similar to the following example:
[share]
netname = MyShare
path = /export/share
hidden = true
[/share]
Adding a Hidden Share Using the CLI
When adding a share using the CLI, use the tsmb-cfg share add
command with the --hidden
parameter to hide the share. For example:
sudo tsmb-cfg share add -n MyShare -p /export/share --hidden true
Updating a Share to Hide It Using the CLI
To update a share to hide it using the CLI, use the tsmb-cfg share update
command with the --hidden
parameter. For example:
sudo tsmb-cfg share update -n MyShare --hidden true
Veto Files
The veto files feature allows administrators to hide files from clients and restrict access to them. It controls both visibility and access, ensuring that even if a user knows the name of a restricted file, they cannot access it unless it matches the allowed pattern set.
Files that are permitted through the veto rules remain subject to the share's permissions and the ACLs applied to the files.
The feature is controlled by two lists, the Allowed Files, and the Denied Files:
- If neither Allowed Files nor Denied Files are set, all files are accessible, based on the share's permissions and the ACLs on the files.
- If only Allowed Files is set, only files that are on the list will be accessible.
- If only Denied Files is set, all files except those that are on the list will be accessible.
- If both Allowed Files and Denied Files are set, only files on the Allowed Files list but not the Denied Files list will be accessible. In other words, the Denied Files list takes precedence.
This feature is controlled by the following parameters:
Setting Veto Files on a Share Using the Configuration File
In the relevant[share]
section of the configuration file for the share you want to configure, set the files_allow
and files_deny
parameters to the desired values, similar to the following example:
[share]
netname = MyShare
path = /export/share
files_allow = *.txt|*.doc
files_deny = secret.*
[/share]
In this example, access is allowed to files with the .txt
and .doc
extensions, but denied to files starting with secret.
. Therefore, even though .txt
and .doc
files are allowed, access to secret.txt
and secret.doc
files will be denied.
Adding a Share with Veto Files Using the CLI
When adding a share using the CLI, you can specify the veto files using the -a
or --files-allow
and -d
or --files-deny
parameters. For example:
sudo tsmb-cfg share add -n MyShare -p /export/share -a "*.txt|*.doc" -d "*.tmp|*.bak"
Updating a Share's Veto Files Using the CLI
To update a share's veto files using the CLI, use the tsmb-cfg share update
command with the -a
or --files-allow
and -d
or --files-deny
parameters. For example:
sudo tsmb-cfg share update -n MyShare -a "*.txt|*.doc" -d "*.tmp|*.bak"
Access Based Enumeration
Access based enumeration allows you to control which shares, files, and folders are visible to users based on their permissions. When enabled, users see resources to which they have at least read access, as defined by their permissions or security descriptors.
Access based enumeration can be enabled either globally or on specific shares:
- When enabled globally, users browsing the server root will only see shares they have permission to access.
- When enabled on a share, users will only see files and folders they have permission to access within that share.
While improving both user experience and security, access based enumeration may affect performance, as the server must evaluate permissions for each share, file, and folder before displaying them.
Global Access Based Share Enumeration
- Configuration file's
[global]
section:access_based_share_enumeration
tsmb-cfg global update
:--access-based-share-enumeration
tsmb-cfg global add
andtsmb-cfg global del
: Not supported
Value Type: boolean
Value Format: true|false
true
: Enables access based share enumeration for the server.false
: Disables access based share enumeration for the server.
Default Value: false
Enabling Access Based Share Enumeration Using the Configuration File
In the [global]
section of the configuration file, set the access_based_share_enumeration
parameter to the desired value, similar to the following example:
[global]
. . .
access_based_share_enumeration = true
. . .
[/global]
Updating the Access Based Share Enumeration Setting Using the CLI
To update the access based share enumeration setting using the CLI, use the tsmb-cfg global update
command with the --access-based-share-enumeration
parameter. For example:
sudo tsmb-cfg global update --access-based-share-enumeration true
Per-Share Access Based Enumeration
Enabling Access Based Enumeration on a Share Using the Configuration File
In the relevant[share]
section of the configuration file for the share you want to configure, set the access_based_enumeration
parameter to the desired value, similar to the following example:
[share]
netname = MyShare
path = /export/share
access_based_enumeration = true
[/share]
Adding a Share with Access Based Enumeration Using the CLI
When adding a share using the CLI, you can specify the access based enumeration setting using the --access-based-enumeration
parameter. For example:
sudo tsmb-cfg share add -n MyShare \
-p /export/share \
--access-based-enumeration true
Updating a Share's Access Based Enumeration Setting Using the CLI
To update a share's access based enumeration setting using the CLI, use the tsmb-cfg share update
command with the --access-based-enumeration
parameter. For example:
sudo tsmb-cfg share update -n MyShare \
--access-based-enumeration true
Host-Based Access Control
Host-based access control allows you to restrict access to a share based on the IP addresses or IP address ranges of clients. However, allowing hosts to access a share does not supersede the permissions or security descriptors set on the share. This means that even if a host is granted access, the user must still have the correct permissions to access the share.
The feature is controlled by two lists, the Allowed Hosts, and the Denied Hosts:
- If neither Allowed Hosts nor Denied Hosts are set, all hosts are allowed access to the share.
- If only Allowed Hosts is set, only hosts that are on the list or in the specified ranges will be allowed access to the share.
- If only Denied Hosts is set, all hosts except those on the list or in the specified ranges will be allowed access to the share.
- If both Allowed Hosts and Denied Hosts are set, only hosts that are on the Allowed Hosts list but not on the Denied Hosts list will be allowed access to the share. In other words, the Denied Hosts list takes precedence.
Setting Host-Based Access Control on a Share Using the Configuration File
In the relevant[share]
section of the configuration file for the share you want to configure, set the hosts_allow
and hosts_deny
parameters to the desired values, similar to the following example:
[share]
netname = MyShare
path = /export/share
hosts_allow = 192.168.0.0/16
hosts_deny = 192.168.2.0/24
[/share]
In this example, access is allowed to hosts in the 192.168.0.0 to 192.168.255.255 range, except for hosts in the 192.168.2.0 to 192.168.2.255 range.
Adding a Share with Host-Based Access Control Using the CLI
When adding a share using the CLI, you can specify the host-based access control using --hosts-allow
and --hosts-deny
parameters. For example:
sudo tsmb-cfg share add -n MyShare \
-p /export/share \
--hosts-allow 192.168.0.0/16 \
--hosts-deny 192.168.2.0/24
Updating a Share's Host-Based Access Control Using the CLI
To update a share's host-based access control using the CLI, use the tsmb-cfg share update
command with the --hosts-allow
and --hosts-deny
parameters. For example:
sudo tsmb-cfg share update -n MyShare \
--hosts-allow 192.168.0.0/16 \
--hosts-deny 192.168.2.0/24
POSIX Permissions at File Creation
You can to control the maximum and minimum POSIX permissions for file creation by using the following parameters: the file/directory creation mask, and the forced file/directory mode.
At creation, the effective permissions are determined by the following calculation:
Permissions = (Default Permissions AND Mask) OR Forced Mode.
To illustrate, let's assume the following configuration:
- File Creation Mask:
0750
: Owner has fullrwx
permissions, group hasr-x
permissions, and others have no permissions. - File Forced Mode:
0644
: Owner hasrw-
permissions, group hasr--
permissions, and others haver--
permissions as well.
Assume a file is created, that based on its path should inherit the permissions 0666
from its parent directory.
The effective permissions are calculated as:
OCTAL BINARY MODE
usr grp oth
––––– ––––––––––––––– ––––––––––––
Default Permissions = 0666 000 110 110 110 rw- rw- rw-
AND AND AND
Mask = 0750 000 111 101 000 rwx r-x ---
–––– ––––––––––––––– ––––––––––––
With Mask = 0640 000 110 100 000 rw- r-- ---
OR OR OR
Forced Mode = 0644 000 110 100 100 rw- r-- r--
–––– ––––––––––––––– ––––––––––––
Effective Permissions = 0644 000 110 100 100 rw- r-- r--
After applying the mask, the effective permissions are 0640
, but since a forced mode is specified, the effective permissions are 0644
, since it's applied after the mask.
You can specify the creation mask and forced mode for both files and directories.
Also, for the forced mode , you can specify the first octal digit to signify addition of the following:
- setuid bit for files (
4
) – indicates that the file should be executed with the permissions of the file's owner, rather than the user who is executing the file (ignored when the user is not mapped to a valid POSIX ID). - setgid bit for directories (
2
)– indicates that files and directories created in this directory should be created with the group ID of the directory, rather than the user's primary group ID. - sticky bit for directories (
1
) – indicates that the directory should be created with the sticky bit set, which would permit deleting or renaming files in the directory only by their owner.
Setting POSIX Permissions at File Creation Using the Configuration File
In the relevant[share]
section of the configuration file for the share you want to configure, set the create_mask
, forced_create_mode
, forced_directory_mode
, and forced_file_mode
parameters to the desired values, similar to the following example:
[share]
netname = MyShare
path = /export/share
create_mask = 0750
forced_create_mode = 0644
forced_directory_mode = 0755
forced_file_mode = 0644
[/share]
Adding a Share with POSIX Permissions at File Creation Using the CLI
When adding a share using the CLI, you can specify the POSIX permissions at file creation using the --create-mask
, --force-create-mode
, --directory-mask
, and --force-directory-mode
parameters. For example:
sudo tsmb-cfg share add -n MyShare \
-p /export/share \
--create-mask 0750 \
--force-create-mode 0644 \
--directory-mask 0755 \
--force-directory-mode 0644
Updating a Share's POSIX Permissions at File Creation Using the CLI
To update a share's POSIX permissions at file creation using the CLI, use the tsmb-cfg share update
command with the --create-mask
, --force-create-mode
, --directory-mask
, and --force-directory-mode
parameters. For example:
sudo tsmb-cfg share update -n MyShare \
--create-mask 0750 \
--force-create-mode 0644 \
--directory-mask 0755 \
--force-directory-mode 0644