Announcement

Collapse
No announcement yet.

Samba permissions for group

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Samba permissions for group

    Hey all,

    I have an issue with SAMBA I've been trying to solve for some time now but I can't find the answer.

    My samba server is running and I have set up personal directories for me and my wife.
    I have also made a dir called shared where we store our shared data like pictures and music.
    When one of us makes a new file or directory it is created with
    drwxr-x--- for directories and
    drwxr-x--- for files.

    That way only the owner can write and i want the group to be able to write to.

    So how do i configure my system that directories are created with 770 and files with 760 so we can both write in each others files and directories?

    I hope someone can help me with this!

    #2
    Re: Samba permissions for group

    Allright.

    I made some progress. I found a tutorial that points to the right direction. It can be found here http://allyourtech.com/content/artic..._workspace.php

    The section for my share now looks like this:
    [SHARED]
    comment = Shared files
    path = /srv/shared
    browseable = no
    read only = no
    guest ok = no
    force create mode = 660
    force directory mode = 770
    valid users = @share
    force group = share

    I expect new directories to have permissions drwxrwx--- but i get drwxrwxr-x
    I expect new files to have permissions -rwxrwx--- but i get -rwxrw-r--

    When i find out more about this i will post the answers here.

    Comment


      #3
      Re: Samba permissions for group

      Figured out the last part!
      My section for the shared files looks like this now:
      Code:
      [SHARED]
        comment = Shared files
        path = /srv/shared
        browseable = no
        read only = no
        guest ok = no
        create mask = 0660
        force create mode = 0660
        directory mode = 0770
        force directory mode = 0770
        valid users = @share
        force group = share

      [SHARED]name of the share in SAMBA
      comment = Shared filesThe comment on mouse over? not that important anyway
      browseable = nohides the share when somebody browses the network
      read only = nodefault = yes. That way nobody can write files.
      guest ok = noI only want users with an account to be able to acces the files
      create mask = 0660Here you override the defaults of linux making rw permissions for owner and group and no permissions for world default for FILES
      force create mode = 0660Here you force new FILES created to have permissions set to -rw-rw----
      directory mode = 0770Here you override the defaults of linux making rwx permissions for owner and group and no permissions for world default for DIRECTORIES
      force directory mode = 0770Here you force new DIRECTORIES created to have permissions set to drwxrwx---
      valid users = @shareEvery user that enters the share will get the group share
      force group = shareEvery file or directory created will be owned by the group "share".


      Now all users with access to SAMBA are able to read/write/delete files in the shared directories.
      Phew, now I have solved this problem up to the next challenge in linux
      Sites that were helpful for me and can be used for background reading:
      http://cri.ch/linux/docs/sk0002.html
      http://allyourtech.com/content/artic..._workspace.php
      http://www.seattlelinuxchix.org/tuto...ies/samba.html

      Martijn

      Comment

      Working...
      X