samba server中设置了新建目录权限无效的问题

发布时间:2024-11-07 05:43

最新推荐文章于 2024-09-16 22:28:14 发布

yanjiee 于 2018-11-13 19:06:54 发布

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

samba客户端连进来后,新建目录设置的权限都是0775,我修改了smb.conf配置文件中的directory mask = 0777都无效,如下:

[share] path = /home/ai2/vismarty/images4detection valid users = aoi,rongxin-samba available = yes browseable = yes writable = yes public = no guest ok = no create mask = 0777 force create mode = 0777 directory mask = 0777 force directory mode = 0777 123456789101112

找了好久原因,终于再谷歌的一篇文章中找到解决办法,即如下配置:

[global] inherit permissions = yes [share] path = /home/ai2/vismarty/images4detection valid users = aoi,rongxin-samba available = yes browseable = yes writable = yes public = no guest ok = no create mask = 0777 force create mode = 0777 directory mask = 0777 force directory mode = 0777 # for windows admin permission security mask = 0777 force security mask = 0777 directory security mask = 0777 force directory security mode = 0777

12345678910111213141516171819

过了一阵子,发现还是会有新建的文件不是777权限,最后这样解决的:

[global] inherit permissions = yes [share] path = /home/ai2/vismarty/images4detection valid users = aoi,rongxin-samba force users = admin available = yes browseable = yes writable = yes public = no guest ok = no 1234567891011

force users = admin 强制将登陆samba后的用户改为admin,和ubuntu的登陆用户一致,这样就不会产生权限问题。

官方说明:
force user (S):
This specifies a UNIX user name that will be assigned as the default user for all users connecting to this service. This is useful for sharing files. You should also use it carefully as using it incorrectly can cause security problems.

网址:samba server中设置了新建目录权限无效的问题 https://www.yuejiaxmz.com/news/view/15125

相关内容

form runat=server标记
个人财务管理系统的设计
河南城发环保能源有限公司新安、民权二个生活垃圾焚烧发电项目高压开关柜设备采购公开招标公告
河南城发环保能源有限公司新安、民权、漯河三个生活垃圾焚烧发电项目电力变压器设备采购公开招标公告
python+flask计算机毕业设计个人财务管理系统的设计与实现(程序+开题+论文)
行政事业单位财务管理中存在的主要问题、原因及整改建议
河南城发环保能源有限公司西平伊川新安民权濮阳淮阳息县内黄八个生活垃圾焚烧发电项目生活污水处理系统设备公开招标公告
河南城发环保能源有限公司漯河、新安、邓州、民权四个生活垃圾焚烧发电项目干式变压器设备采购公开招标公告
关于对中节能(保定)环保能源有限公司生活垃圾焚烧发电二期扩建暨餐厨垃圾无害化处置共建项目环境影响报告书的批复
自然、和谐、舒适、浪漫的家居环境如何布置,不仅是设计的问题

随便看看