43.8. Editing File Permission Settings

File shares have several settings related to the UNIX permissions, and ownership of files within them, that can be set globally or on a per-share basis. Because Windows clients and the SMB protocol have no concept of permissions, it is useful to have a way to set the defaults for new files and directories on a per-share basis. To do this, follow these steps:

1.
On the module's main page, click on the name of the share for which you want to set permissions, then click on the File Permissions icon on its editing page.

2.
In the New UNIX file mode field, enter the octal permissions (as used by the chmod command) that should be assigned to newly created files. For example, mode 600 would allow reading and writing by the owner but completely deny access to anyone else.

3.
In the New UNIX directory mode field, enter the octal permissions for newly created directories. For example, 755 would allow listing and reading by everyone, but only allow the owner to create files in the directory.

4.
To make some directories always appear empty to SMB clients, enter a comma-separated list of full paths into the Directories not to list field. For example, you might enter /proc,/dev to hide the contents of those two directories, which are generally useless to Windows clients.

5.
To force all clients to access files as a specific UNIX user (instead of the user as whom they logged in), fill in the Force UNIX user field. This can be very useful for a share in which different people edit each other's documents, as it avoids the UNIX permission problems that can occur if files are actually owned by their creators.

By default, the group as whom files are accessed will be the primary group of the specified user. To change this, fill in the Force UNIX group field, as well.

6.
Because Windows SMB clients have no support for UNIX symbolic links, Samba will always read or write the linked-to file when a client tries to read or write a link. Unfortunately, this presents a potential security risk, as a symlink could be created that points to a normally inaccessible file outside the shared directory. To prevent this, change the Allow symlinks outside of share? field to No.

7.
On UNIX filesystems, files that are read-only to a user can still be deleted if the directory is writeable. This is not the case on normal Windows filesystems, though, which is why Samba prevents it from happening. To change this and let UNIX filesystem semantics apply, change the Can delete readonly files? field to Yes.

8.
Click the Save button at the bottom of the page to activate the new file security options.

As Section 43.12 “Editing Share Defaults” explains in more detail, you can edit file permission settings for all shares by clicking on the File Share Defaults icon on the main page, followed by File Permissions. These will apply unless overridden for a share by the preceding instructions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.106.150