smbmount : How do file / directory permissions work ?

I am relatively new to using the smbmount command and accessing SAMBA shares via a Linux client.  I want to better understand what happens to file / directory permissions when a smb share is mounted.  Can anyone provide a brief explanation?  Thanks!

fatzjenkinsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

w00pieCommented:
well it inherits read/write from the share itself, if the share is setup to allow users to write to it, then it with generally be mounted rw  if not ro
you can change the owner its mounted as if you want to keep other people out with different mount commands or mount it under a directory that has the permissions to keep people out
such as
mkdir -a /smbshares/somesharename
chmod smbshares 700

you can use mount to specifiy smbfs paritions also
mount -t smbfs -o username=<user>,password=<passwd> -U <uuid of user to mount as> //machine/share  /mntpnt

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fatzjenkinsAuthor Commented:
Anytime I mount a share, I lose the owner / group information from the server.  For instance, if a directory has a share with the following permissions on the smb server :

owner : myname
group : mygroup

Once I mount it on the client, the permissions are changed to :

owner : 502
group : users

502 is the UID number on the server that is associated with MYNAME.  Is there a way to have MYNAME translated correctly to the client instead of the UID number for MYNAME?  Can I do the same for the group? Thanks!



0
jlevieCommented:
The information associated with the mounted data is the numeric UID & GID since that's how it is stored in the file system. Only if that matches local usage will you see the same user and group name.
0
w00pieCommented:
use the -U cmd and then the user id # for user you want to mount as
it won't inherit the user permissions though but to my knowledge smbmount for windows shares didn't carry user id #'s for different files

if your mounting as NFS partition that's another story.  but should all be in the man pages

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.