Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

smbmount : How do file / directory permissions work ?

Posted on 2004-10-29
6
Medium Priority
?
267 Views
Last Modified: 2013-12-16
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!

0
Comment
Question by:fatzjenkins
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 2

Accepted Solution

by:
w00pie earned 400 total points
ID: 12446108
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
 

Author Comment

by:fatzjenkins
ID: 12446762
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
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 400 total points
ID: 12449770
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
 
LVL 2

Expert Comment

by:w00pie
ID: 12450698
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question