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:

[users]

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

using this:

mount -t cifs //192.168.1.2/users /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



Relevant Pages

  • Re: [opensuse] cifs files always created as owner root
    ... How can I create files on the mount as user:group no matter who logs in? ... This only works when uids are matched among all workstations ... to attempt to manage permissions and UIDs of files it creates on a server share. ...
    (SuSE)
  • Re: RES: Samba vs NFS
    ... > and UIDs and permissions for the folders. ... Not *just* like Samba. ...
    (Focus-Linux)
  • Cleanest way to upgrade F7 to F9 (when the time comes)
    ... with samba back out to one remaining Windoze desktop (I'm getting closer ... No other data other than some config files in /boot ... When I tar the home folders, should I preserve the selinux context? ...
    (Fedora)
  • Re: Why my users cant change their home folder permissions while they ...
    ... If they want to change the permissions in order to accomplish ... sharing, then provide server based sharing areas that meet their ... permission on their home folders, but one day they told me ... can't change z: drive permissions. ...
    (microsoft.public.windows.server.security)
  • Re: Script to set share permissions on home directories
    ... I have a directory with ~1600 home folders in it that have incorrect ... Administrators - full control ... NTFS permissions are fine, its just the share permissions that need ...
    (microsoft.public.windows.server.scripting)