Re: CIFS file group:owner list (28 Views)
Reply
Regular Advisor
cam9269
Posts: 157
Registered: ‎10-09-2007
Message 1 of 2 (28 Views)

CIFS file group:owner list

Hi Guys!

I have this one somewhat 'buggy' thing on CIFS.
Background: I was able to mount the windows share directory on my HPUX11.11 server using "cifsmount" and activated guestRemoteUser/guestPassword to allow non-root users to use the CIFS mountpoint.

The problem is when I login as and do an "ls -l" as user1, all the files in the / have the user/group as user1:group1; this same behaviour is also observed whether I use user2, user3, and so on..

Got any ideas what I need to do about this?

TIA!

Please use plain text.
Trusted Contributor
Eric Raeburn
Posts: 137
Registered: ‎11-26-2002
Message 2 of 2 (28 Views)

Re: CIFS file group:owner list

First, are you sure you want to use the guest-user feature? It is rather more secure for the unix users to use cifslogin to authenticate as themselves to the windows server. Of course, this necessitates that each unix user have an account on the windows server, because they can authenticate to windows only with the windows account name and password. See cifslogin(1) and the CIFS Client Admin Guide for more info on this.

Regarding the "buggy" behavior you observe, this is an unavoidable problem due to the basic incompatibility of the windows and unix filesystems. File owners and groups are stored as numbers on the two systems, and there's no way to ensure that the numbers coincide. So the CIFS Client, when returning the results of the dir listing, tells a reasonable lie, giving simply the uid and gid of the user who issued the 'ls'. The same is true for directory sizes: they will always be the same (faked) value, and in fact you can configure the value. This is because while there is a directory size in the unix filesystem, there is no such concept in the windows fs.

Now there is a workaround. If the server is not windows but some distribution of Samba (for example the HP-UX CIFS Server, or any Linux system), then you can enable the "CIFS Unix Extensions" on both the client and server. Then file owners and groups will be reported accurately. I am not sure about directory size though; there was some bug in this and I don't know if is has been resolved.

-Eric
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation