Results 1 to 6 of 6

Thread: samba perms

  1. #1
    Join Date
    Jun 2008
    Beans
    647

    samba perms

    I've seen quite a few postings about how to mount samba shares in fstab, but I just can't seem to get the perms to anything other than rwx-r__-r__ root:root

    I would like them to be something else (depending on what I'm trying to mount) and also my normal username rather than root.

    I'm mounting a Windows samba share. It doesn't require login credentials.

    So, I'm looking for the fstab entry that gives me all the options to set and change the user and perms.

    Thanks so much!

  2. #2
    Join Date
    Mar 2008
    Location
    England
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: samba perms

    try adding the option uid=1000 (or whatever your uid is.)

    Likewise gid for your group.

    I think you can also use your actual username there too, like:

    uid=bob,gid=bob

    Example:

    Code:
    //DECAL/theo /media/decal smbfs users,noauto,iocharset=utf8,directio,uid=theo,gid=theo,file_mode=0770,dir_mode=0770 0 0
    Change auto/noauto if you need to. file_mode and dir_mode should also be pretty obvious.
    Last edited by KeyserSoze93; September 3rd, 2010 at 04:18 PM.
    My Website. Computing resources, photos, articles etc.

  3. #3
    Join Date
    Jun 2008
    Beans
    647

    Re: samba perms

    Quote Originally Posted by KeyserSoze93 View Post
    try adding the option uid=1000 (or whatever your uid is.)

    Likewise gid for your group.

    I think you can also use your actual username there too, like:

    uid=bob,gid=bob

    Example:

    Code:
    //DECAL/theo /media/decal smbfs users,noauto,iocharset=utf8,directio,uid=theo,gid=theo,file_mode=0770,dir_mode=0770 0 0
    Change auto/noauto if you need to. file_mode and dir_mode should also be pretty obvious.

    Using these settings, I get...
    drwxr-xr-x 1 root root
    for all files and folders after I "sudo mount -a".
    I'm not sure what the auto, noauto does.
    I also tried cifs and smbfs.

  4. #4
    Join Date
    Jun 2008
    Beans
    647

    Re: samba perms

    Quote Originally Posted by davidstoll View Post
    Using these settings, I get...
    drwxr-xr-x 1 root root
    for all files and folders after I "sudo mount -a".
    I'm not sure what the auto, noauto does.
    I also tried cifs and smbfs.
    Any ideas why the mounting creds don't match what I'm putting in the fstab mount line?

  5. #5
    Join Date
    Mar 2008
    Location
    England
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: samba perms

    Quote Originally Posted by davidstoll View Post
    Any ideas why the mounting creds don't match what I'm putting in the fstab mount line?
    Try mounting it yourself. i.e. "mount /media/blah" as your own user.

    auto / noauto selects whether the filesystem is mounted when you turn the computer on, see the man page for fstab
    My Website. Computing resources, photos, articles etc.

  6. #6
    Join Date
    Jun 2008
    Beans
    647

    Re: samba perms

    Here is what seems to have fixed it, maybe someone else can give a better explanation...

    If the shared network folder (in my case a Vista share) does not have "Guest" as one of the "people to share with", then when you mount, it gets mounted as 777 root:root....strange.

    In Vista, I had Administrators, [my user name] and Everyone listed as people with access. However "guest" was not in that list. As soon as I added that, fstab behaved as I would have expected.

    So, it was probably more of a windows issue than ubuntu, but I'm not sure why.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •