大网数据广告活动
服务器运维问答

Samba permissions being ignored

· 52CE 我爱测

I have defined the following share in smb.conf [development_server] comment = Development directories path = /sites writeable = yes valid users = @dev guest ok = no directory mask = 0775 create mask = 0775 The problem is that whe…

问题原文

原帖链接 · nullReference · CC BY-SA 3.0

I have defined the following share in smb.conf

[development_server]
    comment = Development directories
    path = /sites
    writeable = yes
    valid users = @dev
    guest ok = no
    directory mask = 0775
    create mask = 0775

The problem is that whenever I create a file within windows the permissions of that file are set as 764 instead of being set as 755. Directories however are set correctly with 775. I am confused. I tried setting the following:

[global]
    unix extensions = yes

But this did not help either.

已采纳解答

原帖链接 · nullReference · CC BY-SA 3.0

The problem turned out to be the security mode settings within my configuration (or lack there of). The following smb.conf configuration is now working for me and all users within my security group "dev" now have 775 for all files they create within the share:

[development_server]
    comment = Development directories
    path = /sites
    writeable = yes
    valid users = @dev
    guest ok = no

    create mask = 0775
    force create mode = 0775
    security mask = 0775
    force security mode = 0775

    directory mask = 0775
    force directory mode = 0775
    directory security mask = 0775
    force directory security mode = 0775

I found this solution while digging through askubuntu

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-11-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。