View previous topic :: View next topic |
Author |
Message |
wizardofos Apprentice
Joined: 20 Jul 2004 Posts: 201
|
Posted: Tue Dec 14, 2004 4:14 pm Post subject: Question about Networkfilesystems (smbfs) |
|
|
Hi
I've a questions about Smbfs and Cifs. Why can I specify uid and gid when I mount a Samba share? Does this make sense? Because the uid and gid are set afterwards at the server to samba:samba.
Or is is possible to mount a samba share completely transparent, that means when i create a file as me:mygroup this will be set on the sambaserver too?
And does this got to do anything with "Unix Extensions" of Cifs?
Greetings
Fabian |
|
Back to top |
|
|
Petyr Guru
Joined: 08 Jan 2003 Posts: 471 Location: San Diego, CA, USA
|
Posted: Tue Dec 14, 2004 4:45 pm Post subject: |
|
|
uhmmm, you can specify the uid and gid when you mount a Samba share. This only has the effect of changing who appears to own the files on the computer that is mounting the share, so I'm not sure if this is what you want, but yea.
checkout the man page for smbmount and search for uid. It's there.
Regards,
Petyr |
|
Back to top |
|
|
wizardofos Apprentice
Joined: 20 Jul 2004 Posts: 201
|
Posted: Wed Dec 15, 2004 9:56 am Post subject: |
|
|
Code: | uid=<arg>
sets the uid that will own all files on the mounted filesystem.
It may be specified as either a username or a numeric uid.
gid=<arg>
sets the gid that will own all files on the mounted filesystem.
It may be specified as either a groupname or a numeric gid.
|
That means when I umount the filesystem, the gid and the uid which owned the file is lost? |
|
Back to top |
|
|
Petyr Guru
Joined: 08 Jan 2003 Posts: 471 Location: San Diego, CA, USA
|
Posted: Wed Dec 15, 2004 5:08 pm Post subject: |
|
|
Sort of. Lemme give a more precise example.
Computer A is sharing soem folder, call it A1, owned by AU. Samba on A has rwx permissions in there, and a few other things are set in the smb.conf file, like force user = AU.
Computer B wants to mount A1, but the user BU wants to use it
smbmount //A/A1 ./mntpoint -o username=AU,uid=BU
after entering the password, A1 is mounted on B at mntpoint.
As far as B is concerned mntpoint is owned by BU, however when you write files in there that's where things are a little more insteresting.
From computer B, a file written to mntpoint appears to be owned by BU,
however on computer A, where the file ACTUALLY resides, the file is in truth owned by AU (as specified by force user)
I hope this clears a few things up for you. If nothing else, experiement with it =)
Petyr |
|
Back to top |
|
|
wizardofos Apprentice
Joined: 20 Jul 2004 Posts: 201
|
Posted: Thu Dec 16, 2004 1:47 pm Post subject: |
|
|
Quote: | I hope this clears a few things up for you. If nothing else, experiement with it =) |
Yop. Thank yoU![/quote][/code] |
|
Back to top |
|
|
|