I mount this share on a client: [users] comment = home folders inherit acls = Yes inherit permissions = Yes path = /home read only = No using this as root on the client: mount -t cifs //192.168.1.2/users /home -o rw,nosetuid I then login as a user on the client authenticated via ldap. No problem. It takes me to the mounted folder and I can see my files. When I create a file it creates it as owner root:root. Not what I want! How can I create files on the mount as user:group no matter who logs in? Thanks. Steve.
TAKAHASHI Motonobu
2011-Oct-15 12:55 UTC
[Samba] cifs mount creates files with root:root permissions
From: steve <steve at steve-ss.com> Date: Wed, 12 Oct 2011 09:42:21 +0200> I mount this share on a client: > > [users] > comment = home folders > inherit acls = Yes > inherit permissions = Yes > path = /home > read only = No > > using this as root on the client: > > mount -t cifs //192.168.1.2/users /home -o rw,nosetuid > > I then login as a user on the client authenticated via ldap. No problem. It > takes me to the mounted folder and I can see my files. When I create a file it > creates it as owner root:root. Not what I want! > > How can I create files on the mount as user:group no matter who logs in? > Thanks. Steve.Essentially it's impossible. Imaging Windows Server, you can only create files on the Windows' share as the connected user. See: http://lists.samba.org/archive/samba/2011-April/162234.html https://lists.samba.org/archive/samba/2011-September/163986.html If setuids option is enabled, you can set permissions as usual but remember that those settings are held in *memory*, so once if you umount and mount again, those settings are lost. --- TAKAHASHI Motonobu <monyo at samba.gr.jp>
Seemingly Similar Threads
- mount -F smbfs
- Is it possible to use Samba as a proxy and cache for a slow CIFS drive ?
- FW: samba 2.2.7a tech issue
- samba4wins nbd_server implementation & configuration
- Problem with samba share file permissions: Write protection is not working as expected