خرید بک لینک

I'm no samba expert but in your place I wouldn't put create mask and directory mask in the [global] section. It should be used in the share definition, that way you can have different masks for different shares. That's first.

Then, for the problem of created files being owned only by particular group/user, you can create one (or more) common group(s) and set users as members of those groups. Then in the share definition use something like:

Code:

create mask = 0664
directory mask = 0775
force group = <groupname>
The create mask is used for files and never use 775 or 777 for it. That will make all newly created files executable, when in reality you rarely need executable files. The bit 1 is for execute or search when applied on folders. That's why folders should have it (so that they can be opened) but files no. Use 775 for folders and 664 for files.

The force group will make all files being created as created by that group. Then each member of the group will have Write permissions because you used mask 664 which gives RW to user and group and R to everyone else.

Would something like that work for you?

Don't forget that linux permissions are separate for samba permissions so it will be important that the path where the share is to be also RW for all users and groups that will need to use it.

For the group membership you can also use the sticky bit on a folder and if I'm not mistaken that makes all files created in it to have same group membership as the parent folder.

PS. I just checked smb.conf man page, create mode is synonym for create mask, so don't use both. Makes confusion. Use just create mask and directory mask, and drop any uecessary settings from smb.conf. It looks like it can be cleaned up little. Start small and then add complexity...

PPS. Also, one important thing: The force directory mask and force create mask are used in a different way. You should not set them to 775. By default they are 000 and leave them alone. Control the permissions without the 'force' only with the standard 'directory mask' and 'create mask'.

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 19 فروردين 1395 ساعت: 17:02

صفحه بندی