最近有一个Ubuntu 12.04盒子与另一个盒子交谈。运行Samba 3.6.3。
服务器框有一个名为“root”的samba共享,映射到/ smb.conf几乎每个参数都有0777!
[root]
writeable = yes
create mode = 0777
create mask = 0777
force create mode = 0777
path = /
directory mode = 0777
force directory mode = 0777
read only = no
如果我在fstab中有以下内容然后执行mount -a,它会执行mount,并且作为root我可以读取和写入:
//slf.mybiz.net/root /mnt/slf smbfs username=asambauser,password=apassword 0 0
但是,如果我在客户端上做一个su www-data(试图模仿一个Apache / PHP服务器),我会得到以下错误序列:
$ cd /mnt/slf
$ ls -la
total 24
drwxrwxrwx 23 root users 0 Dec 9 17:02 .
(rest deleted, as I presume it's the permissions of . that are important)
$ echo g > ddd
sh: 1: cannot create ddd: Permission denied
(虽然奇怪的是创建了一个0字节的文件)
我认为在Samba链接上没有任何关于用户是谁的聪明的事情。当然,如果我卸载/ mnt / slf,我可以写入/ mnt / slf作为www-data。
撕掉我头上的小头发!!!
答案 0 :(得分:3)
最终发现有人遇到同样的问题:
并添加"默认值,noperm" mount命令修复了我的问题