Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: samba mount permissions / ownership

  1. #1
    Join Date
    Jul 2012
    Location
    /tropics/islands/statia
    Beans
    275
    Distro
    Kubuntu 12.04 Precise Pangolin

    samba mount permissions / ownership

    Hi,

    I mount a samba share at boot with this in fstab:

    Code:
    //fritz.box/WD-10EADSExternal-01 /mnt/samba  cifs  guest,_netdev  0 0
    It works, I can read from the disk, I can write to the disk, but every write ends with "can't change permissions on foo.bar". Turns out all the files are owned by root, and of course I am working as user.
    I know I could add my UID and GID to fstab, but there are more users on this machine.
    I don't know if it is possible to add multiple UID's to fstab?
    I tried adding "user" to fstab, but that did not work, IIRC, that only means every user can mount and unmount the share.
    Is there an other solution?
    I could make a script in rc.local for every user that mounts the drive with their UID and GID, but I think there should be an easier option.

  2. #2
    Join Date
    Jul 2012
    Location
    /tropics/islands/statia
    Beans
    275
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: samba mount permissions / ownership

    Tried so far:

    Code:
    # chmod 766 /mnt/samba/
    (with drive unmounted)

    Added "noperm" as an option in fstab

    Added gid=121 to fstab, no UID.

    (In /etc/group: sambashare:121:statia,user2)

  3. #3
    Join Date
    Jul 2012
    Location
    /tropics/islands/statia
    Beans
    275
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: samba mount permissions / ownership

    Time for the I'm-in-the-wrong-timezone BUMP.

  4. #4
    Join Date
    Jul 2012
    Location
    /tropics/islands/statia
    Beans
    275
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: samba mount permissions / ownership

    Try this timezone BUMP?

  5. #5
    Join Date
    Sep 2010
    Location
    Indian Capital City
    Beans
    886
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: samba mount permissions / ownership

    The 'noperm' which you added might not be sufficient. The man page itself says
    Code:
    Note that this does not affect the normal ACL check on the target
    machine done by the server software (of the server ACL against the
    user name provided at mount time).
    I am not sure if this will work but you may try the 'force user' option on the Samba server for that share
    This should switch whatever user connects to switch to the permission of the 'force user' and might do the trickTHe
    Last edited by luvshines; September 19th, 2012 at 09:12 AM.
    When you have eliminated the impossible, whatever remains, however improbable, must be the truth !!
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Mark it [SOLVED] if the issue has been resolved

  6. #6
    Join Date
    Jul 2012
    Location
    /tropics/islands/statia
    Beans
    275
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: samba mount permissions / ownership

    Quote Originally Posted by luvshines View Post
    I am not sure if this will work but you may try the 'force user' option on the Samba server for that share
    This should switch whatever user connects to switch to the permission of the 'force user' and might do the trick
    I can't really change things on the server side. I forgot to mention in this post (it is mentioned in my other post in this subforum, which could use some input, hint, hint, nudge nudge wink wink), the server is a Fritz!Box 7360 wireless router.
    It runs something called FritzOS, which may or may not be Linux (-derived), but I don't have shell access on this box, and very limited options for configuration of its NAS functions.

  7. #7
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    801
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: samba mount permissions / ownership

    What happens if you open up the share in Nautilus?
    For instance enter this address (Ctrl-L)
    smb://fritz.box/WD-10EADSExternal-01
    Can you read/write using some user credentials (as should be supplied with you NAS) or guest?
    If so, it would be possible to automate the mounting of shares at the user level using a variation of this technique with an app called Gigolo. No need for fstab entries.

    Cheers!
    Last edited by LewisTM; September 19th, 2012 at 04:45 PM.
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  8. #8
    Join Date
    Jul 2012
    Location
    /tropics/islands/statia
    Beans
    275
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: samba mount permissions / ownership

    Quote Originally Posted by LewisTM View Post
    What happens if you open up the share in Nautilus?
    For instance enter this address (Ctrl-L)

    Can you read/write using some user credentials (as should be supplied with you NAS) or guest?
    If so, it would be possible to automate the mounting of shares at the user level using a variation of this technique with an app called Gigolo. No need for fstab entries.
    Nope, doesn't work:

    Code:
    Could not display "smb://fritz.box/wd-10eadsexternal-01%20/".
    Error: Failed to mount Windows share
    Please select another viewer and try again.

  9. #9
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    801
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: samba mount permissions / ownership

    You have a trailing space there (%20). Make sure the address has not space at the end. You can end it with a slash to make sure.
    smb://fritz.box/WD-10EADSExternal-01/
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  10. #10
    Join Date
    Jul 2012
    Location
    /tropics/islands/statia
    Beans
    275
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: samba mount permissions / ownership

    Quote Originally Posted by LewisTM View Post
    You have a trailing space there (%20). Make sure the address has not space at the end. You can end it with a slash to make sure.
    smb://fritz.box/WD-10EADSExternal-01/
    Yep, that gets me there. But if I use nautilus to copy a regular file from my ~, it still ends up on the share with ownership by root.

Page 1 of 2 12 LastLast

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
  •