Permissions samba

  • Hello everyone!


    First of all, after testing some of different "cloud" softwares and OS, mediavault is AWESOME. Thanks for that!


    Now my problem, iam trying to have a simple shared folders with samba for a group of friends. The permissions are easy (or at least it sounds easy) everyone can read everything in the folder, everyone can upload things (with quota), but only the owner (aka the guy who uploaded it) can rename, delete or modify the file.


    After a big research and lost hours of testing, all i could figure out is this. Create the folder with root acount and apply 1774 chmod permisions. That fix the delete and rename but not the modify part.


    Does anyone have a better/complete solution?


    Thanks in advance!

  • Hi,


    Linux splits the permissons in three parts: user (=owner), group, all (other).


    To make a folder completly usable for more users, you have to change the permission basis from user-based to group-based.


    Unfortunately i don't know, how to do so under OMV-WebGUI :(


    Sc0rp

  • Thanks for your answer! I do know something about linux permissions, i am trying to samba set a 744 or 755 automatically to files uploaded from windows client.


    Sadly all my tests (create mask and so on) show that i can modify the mask of the owner and the mask for others (first and last character), but no matter what i put in the middle character the permissions remain in X7X.


    I didnt found anything in the GUI either, all the changes i am doing is from the console.

  • Re,

    Thanks for your answer! I do know something about linux permissions, i am trying to samba set a 744 or 755 automatically to files uploaded from windows client.

    744 or 755 ... stands for:


    7 = 4+2+1 (user (=owner) can r(ead),w(rite) and (e)x(ecute) = rwx
    5 = 4+1 (group can r + x) = r-x
    5 = 4+1 (others (aka All) can r +x) = r-x


    so for 744 it is:
    7 = 4+2+1 (user (=owner) can r(ead),w(rite) and (e)x(ecute) = rwx
    4 = 4 (group can r) = r--
    4 = 4 (others (aka All) can r) = r--


    So may be it will help to set the permissions to 775 or 774 (770 will work too, may be interferencing with some system-users :P)


    Sc0rp

  • Yes, that is what i'm aiming for, only owner can write/modify the files.

  • Re,


    and ah, seems i didn't understood you right ... you wanna have that scenario, but actually you don't have it?


    You need a share, which preseves the owner and all others (the group) can read and execute, but not write - is that correct?


    Sc0rp (a little bit confused now ...)

  • Probably its my fault, im not good at explain myself :)


    Yes! i Want to have that scenario, that every file uploaded at my omv server trough samba and windows client have 744 or 755 permissions (owner=full control, group and others=only read or read and execute).


    Also if we can figure out how to (automatically) makes folders 1774 root:users will be awesome, but im less worried about that since i can do it manually. EDIT: I dont want another users delete o rename files they didnt upload.


    Thanks for your patient!

  • Re,
    np ... np ;)


    Also if we can figure out how to (automatically) makes folders 1774 root:users will be awesome, but im less worried about that since i can do it manually.

    I think that is not a good way and should be avoided.
    For sure, you make it "automatically" via scripting. On Boot (apends on the other boot-scripts) or periodically (using cron).


    I'll look into this if i'm home - i own a book about samba :P. Further: may be i can finish my Test-NAS this evening and provide pic's, but i have a bad feeling about this, cause of family stuff ...


    Sc0rp

  • I know is not a good way, but it is the only way i found for the moment. :(


    I was thinking on using a script using cron, i still have no idea how to make it, but i'll probably figure out!


    Don't worry take your time, of course family stuff goes before NAS stuff :)


    I had never figure out how dificult its make a folder with everyone can upload, everone can read but only owner of the file can delete/modify. I really thought it will be matter of minutes of chmod or tunning settings on web access.


    Thanks again for your time, i really appreciate.

    • Offizieller Beitrag

    The default samba configuration in Omv uses 755 for folders and files. You should be using root:users 2775 as starting shared folder not 1775 (sickly bit). Also for flexible group mask use the enable permission inheritance button in samba that should do 775 on newly files, then everyone should edit each other's files.

  • The default samba configuration in Omv uses 755 for folders and files. You should be using root:users 2775 as starting shared folder not 1775 (sickly bit). Also for flexible group mask use the enable permission inheritance button in samba that should do 775 on newly files, then everyone should edit each other's files.

    Hello sir Moderator and thanks for your answer :)


    I made a clean instalation (since i messed up so much the last one) of omv to test it out. And, yes you are right the default permissions are 755, i don't know what i modified to change that but was persistent :S


    To this configuration work as i want i only need to fix something, this way only owner can modify BUT everyone can delete or rename. How can i fix this?
    EDIT: The only way i found for the moment was with that sticky bit.


    I really appreciate all the help.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!