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

Thread: [SOLVED] User rights on a Samba share

  1. #1
    Join Date
    Jul 2007
    Location
    The Bavarian Alps
    Beans
    129
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    [SOLVED] User rights on a Samba share

    I have a samba share set up on my Kubuntu PC.
    It is working great. My son can see it from his XP PC.
    I set up a samba user with my son's login name and password.

    Here is the share out of my smb.conf
    [SharedFiles]
    path = /home/neill/SharedFolder/
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0755
    force user = neill
    force group = neill

    Up to now everything is great but ...

    ... there is always a but isn't there ...

    He appears to have full rights on the share and can also delete the files. And this despite my having set up the rights on the shared directory so that only the owner has all rights, others are read only.

    Is this normal?
    What can I do to change things so that he only has read access?

    Thank you in advance for any and all help.
    Neill
    I am a newbie. I have been for many years now. Sometimes I feel that I understand things, turn the corner and find that there is even more to understand.

  2. #2
    Join Date
    Jul 2007
    Location
    The Bavarian Alps
    Beans
    129
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: User rights on a Samba share

    Having spent an afternoon looking in to this, I am still non the wiser.
    Is it maybe something to do with the line
    directory mask = 0755
    in the conf file.

    This line suggests that the owner can do everything but that the user also has most rights.

    I am sure this is trivial but it is well over my head.

    Thank you!
    I am a newbie. I have been for many years now. Sometimes I feel that I understand things, turn the corner and find that there is even more to understand.

  3. #3
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: User rights on a Samba share

    I used to think I understood Samba - the "new" version has made me much less confident. My suspicion is that the force user=neill line gives everyone the same rights as neill. You might comment out the force user= line - leave the force group= line, and give the group read-only rights. Another option might be to change the share to read-only, and see if the owner can still add files.
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  4. #4
    Join Date
    Jul 2007
    Location
    The Bavarian Alps
    Beans
    129
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: User rights on a Samba share

    Thank you for that.
    I really don't understand Samba but I will try both your ideas and get back to you to let you know if either work.
    Thanks again
    Neill
    I am a newbie. I have been for many years now. Sometimes I feel that I understand things, turn the corner and find that there is even more to understand.

  5. #5
    Join Date
    Jan 2007
    Beans
    5,549

    Re: User rights on a Samba share

    change
    read only = no
    to
    read only = yes

  6. #6
    Join Date
    Jul 2007
    Location
    The Bavarian Alps
    Beans
    129
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: User rights on a Samba share

    Is it really that easy?
    Thank you so much.
    I am currently 600 kilometres away from my PC (PC in Germany and I am in Italy) but as soon as I get back I will try that.
    Wish I was going home tonight so I could write "it works!"
    Neill
    I am a newbie. I have been for many years now. Sometimes I feel that I understand things, turn the corner and find that there is even more to understand.

  7. #7
    Join Date
    Sep 2006
    Beans
    Hidden!

    Re: User rights on a Samba share

    You can install a very simple apllication
    Code:
    sudo apt-get install system-config-samba
    Then go to System -> Administration -> Samba
    You can also set a password on the share with different users and pw.

  8. #8
    Join Date
    Jul 2007
    Location
    The Bavarian Alps
    Beans
    129
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: User rights on a Samba share

    Now I really need to get home and try that out.
    You mean I really didn't need to spend a year getting Samba to work? I could have just installed this application and done it all from there?
    Thank you.
    I will try that as well tonight.
    Neill
    I am a newbie. I have been for many years now. Sometimes I feel that I understand things, turn the corner and find that there is even more to understand.

  9. #9
    Join Date
    Jul 2007
    Location
    The Bavarian Alps
    Beans
    129
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: User rights on a Samba share

    Thank you both of you.
    It is now as I wanted it.

    sudo apt-get install system-config-samba
    installed the program as Kemon said it would.
    I can use that to decide if a share is writable or not.

    But it has added a line
    valid users = Max, alison, avahi-autoipd, avahi, backup, bin, daemon, dhcp, games, gnats, haldaemon, hplip, irc, klog, list, lp, mail, man, messagebus, neill, news, nobody, proxy, root, sync, sys, syslog, uucp, www-data

    Any idea why it did that? The only users that I needed were Max and Neill. Who are all these users anyway? I deleted everyone except Max and neill. Do I really need this line?

    Also the tip about changing read only worked perfectly.
    Thank you both of you.
    Neill
    I am a newbie. I have been for many years now. Sometimes I feel that I understand things, turn the corner and find that there is even more to understand.

  10. #10
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: User rights on a Samba share

    Those all look like internal system "users". Dunno why the easy way added all that... but it might be an argument for the hard way... plus, look how much you learned Having the valid users= probably isn't a bad idea, cleaning out the extras is probably good, too. Congrats - mark this one [SOLVED] (Under Thread Tools).
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

Page 1 of 2 12 LastLast

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
  •