Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question about Networkfilesystems (smbfs)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
wizardofos
Apprentice
Apprentice


Joined: 20 Jul 2004
Posts: 201

PostPosted: Tue Dec 14, 2004 4:14 pm    Post subject: Question about Networkfilesystems (smbfs) Reply with quote

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
View user's profile Send private message
Petyr
Guru
Guru


Joined: 08 Jan 2003
Posts: 471
Location: San Diego, CA, USA

PostPosted: Tue Dec 14, 2004 4:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
wizardofos
Apprentice
Apprentice


Joined: 20 Jul 2004
Posts: 201

PostPosted: Wed Dec 15, 2004 9:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Petyr
Guru
Guru


Joined: 08 Jan 2003
Posts: 471
Location: San Diego, CA, USA

PostPosted: Wed Dec 15, 2004 5:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
wizardofos
Apprentice
Apprentice


Joined: 20 Jul 2004
Posts: 201

PostPosted: Thu Dec 16, 2004 1:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum