Solved

smbmount : How do file / directory permissions work ?

Posted on 2004-10-29
263 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
Question by:fatzjenkins
    4 Comments
     
    LVL 2

    Accepted Solution

    by:
    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
    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
    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
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
    Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    913 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now