a*******e 发帖数: 3021 | 1 以前问过怎么让samba自动设置从windows share来的文件的属性的问题
最近有空google了一下,samba自带的mask就可以
samba缺省得属性设置好像是rwxr-xr-x
如果要让建立的文件是rw-------就用下面的例子
另外还可以force user, force group
[data]
path = /home/samba/data
browseable = yes
guest ok = yes
writeable = yes
create mask = 600
directory mask = 700
force user = joe
force group = accounting | s**h 发帖数: 1889 | 2 thx. always wondering how to do this.
【在 a*******e 的大作中提到】 : 以前问过怎么让samba自动设置从windows share来的文件的属性的问题 : 最近有空google了一下,samba自带的mask就可以 : samba缺省得属性设置好像是rwxr-xr-x : 如果要让建立的文件是rw-------就用下面的例子 : 另外还可以force user, force group : [data] : path = /home/samba/data : browseable = yes : guest ok = yes : writeable = yes
| a*******e 发帖数: 3021 | 3 补充一个可能大家都知道的
umask可以更改用户默认的常见文件/目录权限
The default file permissions (umask):
Each user has a default set of permissions which apply to all files created
by that user, unless the software explicitly sets something else. This is
often called the 'umask', after the command used to change it. It is either
inherited from the login process, or set in the .cshrc or .login file which
configures an individual account, or it can be run manually.
Typically the default configuration is equivalent to typing 'u
【在 a*******e 的大作中提到】 : 以前问过怎么让samba自动设置从windows share来的文件的属性的问题 : 最近有空google了一下,samba自带的mask就可以 : samba缺省得属性设置好像是rwxr-xr-x : 如果要让建立的文件是rw-------就用下面的例子 : 另外还可以force user, force group : [data] : path = /home/samba/data : browseable = yes : guest ok = yes : writeable = yes
| a*******e 发帖数: 3021 | 4 再来一个gnome下更改默认创建的文件/目录权限
For gnome to tale into account settings you must create in your home
directory a file called ".gnomerc" and put the umask command in it.
Of course you can also use any other shell command.
Nautilus, etc... will now use the new value (after re-login of course)
created
either
which
which
【在 a*******e 的大作中提到】 : 补充一个可能大家都知道的 : umask可以更改用户默认的常见文件/目录权限 : The default file permissions (umask): : Each user has a default set of permissions which apply to all files created : by that user, unless the software explicitly sets something else. This is : often called the 'umask', after the command used to change it. It is either : inherited from the login process, or set in the .cshrc or .login file which : configures an individual account, or it can be run manually. : Typically the default configuration is equivalent to typing 'u
|
|