我几乎准备好把我的头发脱掉(至less我有一个体面的数量:P)
我为所有的开发团队build立了一个Ubuntu 11.04盒子来工作。 一切正常工作到目前为止,但有一个关于默认文件权限的小问题。
我一直在寻找超过2小时,当有人在samba共享上创build一些东西时,如何设置文件和文件夹的默认权限。
到目前为止,从我的Linux机器通过SMBFS的Linux服务器,它适用于目录,他们是标签DRWXRWX —这是我想要的。
文件tho没有设置为-RW-RW —-就像我想要的。 该团体写从不想要点亮。
我已经尝试了所有可能的configuration标志的组合创build模式,创build面具,强制创build模式强制安全模式,没有什么作品。 所以我最后在这里问。
相关的configuration文件部分:
[homes] comment = Home Directories browseable = yes # By default, the home directories are exported read-only. Change the # next parameter to 'no' if you want to be able to write to them. read only = no # File creation mask is set to 0700 for security reasons. If you want to # create files with group=rw permissions, set next parameter to 0775. # create mask = 0660 create mode = 0660 # force security mode = 0660 # force create mode = 0660 # Directory creation mask is set to 0700 for security reasons. If you want to # create dirs. with group=rw permissions, set next parameter to 0775. # directory mask = 0777 # force directory security mode = 0770 # force directory mode = 0770 directory mode = 0770 valid users = %S
这听起来像你可能已经尝试过这种组合,但我的桑巴股份是这样设置的,新的文件和目录创build具有正确的权限,如果有任何帮助:
[public] comment = samba share path = /path/to/my/share browseable = yes force group = smbuser create mask = 0660 directory mask = 0660
使用force create mode 。 所有设置为force create mode的位将强制在每个创build的文件中。 这只影响文件创build – 如果要防止某人在创build文件后closures任何权限标志,请使用force security mode 。