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

How can I stop Samba from writing extended ACLs?

· 52CE 我爱测

Is there any configuration option to stop Samba from writing extended ACLs for newly created files? I only found nt acl support but this seems to disable support for permissions completely. I want Samba to behave as if my filesys…

问题原文

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

Is there any configuration option to stop Samba from writing extended ACLs for newly created files? I only found nt acl support but this seems to disable support for permissions completely. I want Samba to behave as if my filesystem didn't support ACLs.

已采纳解答

原帖链接 · Julen Larrucea · CC BY-SA 4.0

This answer does not really solve the problem, but as nobody else answered anything for years, I'll share my experience hoping it might help someone. Please correct me if I am wrong.

There doesn't seem to be an easy way to do that. With "easy", I mean, not with a standard configuration option. It probably requires recompiling samba with the option --with-acl-support=no, and even recompiling the kernel.

I am saying this after testing by explicitly disabling every single acl and xattr option in the samba configuration.

The easiest solution would probably be to disable ACLs on the server and the file system of the share. But that is also not easy.

I did manage to disable ACLs on XFS, by formatting the partition as mkfs.xfs -m crc=0 /dev/mydev1, and mounting it with mount -t xfs -o noattr2 /dev/mydev1 /mnt/mymount. But surprisingly the ACLs can still be stored!

The reason behind this, seems to be that kernels newer than 2.6 come already with the ACL support pre-compiled. Try running grep -i acl /boot/config-$(uname -r) and you'll see plenty of entries, including "CONFIG_CIFS_ACL" with values "=y", which means that they are hard-coded into the kernel, and cannot be disabled.

So, either recompile samba and/or the kernel, or as we did, learn to live with it and eventually adopt the ACL policy.

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

资料来源与适用范围

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

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

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