CIFS安装权限

我有一个问题,我会围绕着,我希望你能帮上忙。

设置:

服务器1(CIFS客户端) – CentOS 6.3 AD集成了Samba / Winbind&idmap_ad服务器2(CIFS服务器) – CentOS 6.3 AD集成了Samba / Winbind&idmap_ad

所有的用户(除了root)都经过了ADauthentication,包括团体在内的用户可以愉快地工作。

什么工作:

我在服务器2上创build了一个共享:

[share2] path = /srv/samba/share2 writeable = yes 

权限分享:

 drwxrwx---. 2 root domain users 4096 Oct 12 09:21 share2 

我可以以user5(域用户的成员)身份login到Windows机器,并且一切正常,例如:如果我创build了一个文件,它将在MS和Linux端显示正确的权限和属性。

我倒下的地方:

我使用以下命令在服务器1上安装共享:

 # mount //server2/share2 /mnt/share2/ -o username=cifsmount,password=blah,domain=blah 

或者使用fstab:

 //server2/share2 /mnt/share2 cifs credentials=/blah/.creds 0 0 

这很好,但….

如果我是su,或者以普通用户身份login到服务器1(比如user5)并尝试创build一个文件,我会得到:

 #touch test touch test touch: cannot touch `test': Permission denied 

然后,如果我检查文件夹创build的文件,但作为cifsmount用户:

 -rw-r--r--. 1 cifsmount domain users 0 Oct 12 09:21 test 

我可以重命名,删除,移动或复制周围的东西作为user5,我只是不能创造任何东西,我做错了什么?

我猜这是与挂载操作有关,因为当我login到server2作为user5和本地访问文件夹它都应该如此。

任何人都可以指向正确的方向吗?

看看“noperm”挂载选项。 您也可以考虑查看服务器上的“unix extensions”选项。

mount.cifs页:

 setuids If the CIFS Unix extensions are negotiated with the server the client will attempt to set the effective uid and gid of the local process on newly created files, directories, and devices (create, mkdir, mknod). If the CIFS Unix Extensions are not negotiated, for newly created files and directories instead of using the default uid and gid specified on the the mount, cache the new file´s uid and gid locally which means that the uid for the file can change when the inode is reloaded (or the user remounts the share). 

请将此选项添加到您的fstab 。 如果它仍然不起作用,我会认为UNIX扩展在您的设置中不起作用。