Re: [opensuse] cifs files always created as owner root

On Tuesday 11 Oct 2011 21:47:18 John Andersen wrote:
On 10/11/2011 8:57 AM, lynn wrote:
I mount this share on a client:


comment = home folders
inherit acls = Yes
path = /home
read only = No

using this:

mount -t cifs // /home -o rw,setuid

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. L x

I fought this battle some years ago, and the problem, as best I can recall
was that the normal cifs mount of a samba share would have the client
trying to set permissions and uids. This only works when uids are matched
among all workstations (the NFS mindset).

I found it necessary to force the mount commands to not allow the local
workstation to attempt to manage permissions and UIDs of files it creates
on a server share.

I believe the noperm and nosetuids parameters were the key to this, but
that was at a site which I no longer manage, so I can't check on this for
you. Man mount.cifs sees to suggest this is the approach needed to allow
the samba server to manage permissions and ownership.

Thanks. I tried mounting with the nosetuids and noperm but still I get
root:root ownership.

The thing is, the [homes] share ought to do this without me doing anything
according to the stuff I've read. Anyway, will join the samba list and see
what they say.

L x
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx