Operating System - HP-UX
1748252 Members
3970 Online
108760 Solutions
New Discussion

Re: CIFS file group:owner list

 
cam9269
Regular Advisor

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!

1 REPLY 1
Eric Raeburn
Trusted Contributor

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