[linux-cifs-client] Mapping UIDs with Linux to Linux CIFS session

a.nielsen at research.uq.edu.au a.nielsen at research.uq.edu.au
Wed Mar 23 02:24:27 GMT 2005


Hi all,

I'm trying to mount a share on a Linux box from a remote Samba server, and
so far I've got this working with CIFS.  Unfortunately the remote server
uses different UIDs and GIDs to my local machine, so instead of all the
files showing up as owned by me (adam/users) it shows up with the remote
UIDs converted to local names (8109/ftp).  This only leaves me with two
options:

  1) Nobody can write to the share because there is no UID for 8109 on the
local machine.
  2) Use the "noperm" option and let *everyone* write to the share.

Needless to say, I only want certain local users to have access to the share
(but as far as the remote Samba server is concerned, all the requests should
arrive as the user who mounted the share.)

Is it possible to "map" UIDs across the mount, so that (perhaps in the
credentials file) I can specify that I want UID 8109 to appear as UID 1000?
And likewise GID 50 on the server should appear as GID 100 on the local
machine.  This wouldn't solve the problem of allowing multiple local users
access to the share, but restricting it to one local user would be better
than the current situation of either no local users or all local users.
Alternatively, "noperm" behaviour with a list of local users/groups
permitted to read/write to the share would work as well (perhaps the
permissions of the mount-point itself could be used for this?)

Just as a bit of background information, changing permissions of the remote
files (like "chmod g+w") won't help, as the remote share is the underlying
storage for a web site, so we don't want any other users on the server
having access to our files.  Likewise overriding the attributes when being
reported locally is no good, because sometimes we do need to change the
permissions of the actual folders on the server.

Any info would be greatly appreciated!

Thanks,
Adam.


More information about the linux-cifs-client mailing list