Samba folder access problem

Discussion in 'Server Operation' started by Tray2, Apr 27, 2012.

  1. Tray2

    Tray2 New Member

    Samba folder access problem [Solved]

    Hey guys,

    Ubuntu 12.04 is out and i want to update my server and in the process making my media and fileserver a bit more customized. Unfortunatly i ran in to some trouble with Samba and i hope you guys can help me out.

    This is what i'm trying to acheive.

    I have three users that i want to be able to access certain areas on my shares.

    Lets say that the users are users are myself, mywife and mediaplayer.

    I want each of this users to connect to their home on the server. There i have a symlink that points to my raid. This part works fine.

    When you follow the link you'll see a list of folders like this

    and so on. So onto the problem. I want myself to have full access to everything and mywife shall have full access to the MyWife folder and rx to Movies and Music. Lastly i want mediaplayer to have rx to Movies and Music.

    Restricting the access is not a problem it's gettiong access for myself to the Mywife folder. I Put both of us into a group marrige and set mywife as owner to the folder and the group to marrige. Since i don't want anyone except mywife or a user belonging to marrige (me) to be able to rwx in this folder i put permission 770 on it. This works fine from the shell. My admin user can't access the folder since he doesn't belong to marriage and myself can access the folder.

    So everything is peachy.... no it ain't :( when i try to access it from my windows machine it says permission denied. Permission 775 works but then mediaplayer can access it to and i don't want that.

    It seems that samba isn't checking group permissions.

    Is there anyway around this without creating symlinks to the folders i want on each user ?

    The main reason i want to do it this way is that i can add folder and just set the permission and group on them to handle who gets to see and access what.

    Hopefully some of you can help me solve this issue.

    Cheers Tray2
    Last edited: Apr 29, 2012
  2. Tray2

    Tray2 New Member


    So i now managed to get access for myself to the mywife folder and preventing mywife to access myself. the problem now is that media still has access to mywife and it shouldn't.

    The permissions is set add follows.
    myself 700 (myself is owner and group)
    mywife 770 (mywife is owner and marrige is group)
    Movies 775 (myself is owner and marrige is group)

    If i log in as mywife i don't se myself like it should and if i log in as myself i see everything. Yea :) But if i log in ad media i see and can access mywife which shouldn't be possible since media doesn't belong to marrige.

    i have hide unreadable = yes set in the global section to prevent samba from showing folders that you don't have permission to read.

    Any ideas how to get this to work ?

    Cheers Tray2
  3. Tray2

    Tray2 New Member

    Update 2.

    I think i solved the issue.

    This is what i did.

    I put permission 700 on myself, 770 on mywife and 755 on movies.
    Left the root as owner and group on the shared folder (/media/raid).
    And instead of using mask 777 in samba i used 770 and it seems to be working like a charm. Next step is to see if myself can delete files created by mywife

    Cheers Tray2

Share This Page