Find the answer to your Linux question:
Results 1 to 6 of 6
Currently running Ubuntu server, and have set up a file share for each user, and a symlink for a folder that will contain all the customer & job folders. Trouble ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2014
    Posts
    10

    Samba new directory permission issue


    Currently running Ubuntu server, and have set up a file share for each user, and a symlink for a folder that will contain all the customer & job folders.

    Trouble is when userA creates a new folder userB cannot write to it.

    Ls -l shows that the folders are owned by the correct same group but the permission's aren't correct.

    The smb.conf has the following lines for this particular share:

    Code:
    [jobs]
    path =
    comment = Jobs
    Writable = Yes
    Browsable = Yes
    # changed group symbol for (a) Forum thinks its a link
    valid users = (a)staff
    follow symlinks = yes
    wide links = yes
    unix extensions = no
    create mask = 0770
    directory mask = 0770
    force create mode = 0770


    My understanding being that new directory and files will give owner and group full wrx permissons.

    Instead i'm getting this

    Code:
    drwxr-xr-x 2 david       staff 4096 Jan 26 19:47 123
    drwxr-xr-x 2 david       staff 4096 Jan 26 19:45 770

    Its got me stumped So welcome any help!

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    649
    The user's "umask" value defines the default permissions that will be applied to directories and file. By the way files should never be defaulted to include the execute permission set. Remember that the "x" permission for directories allows browsing within that directory.

  3. #3
    Just Joined!
    Join Date
    Jan 2014
    Posts
    10
    Cheers for the reply alf55.

    Changed the umask to 0007 so myself and the group will be able to write to the jobs folder.

    I think we'll need browsing of directories by default for the group. The jobs folder will have folders for each customer, inside which a folder for each job, containing numerous files for that job.

    I welcome any suggestions if you think Theres a better way.

  4. #4
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    649
    I mentioned the "browsing" only to let you know that it is present with the "x" permission. Use when needed and safe.

  5. #5
    Just Joined!
    Join Date
    Jan 2014
    Posts
    10
    Further testing I think i've narrowed it down to an access control list I was experimenting with...

    All the permissions have a + at the end (which from what I've read means ACL permissions apply):this seems to over ride the samba.conf file.

    It worked on another share, just not on 'jobs' share. No biggie as its only a test server our new box arrives Monday!

  6. #6
    Just Joined!
    Join Date
    Feb 2014
    Posts
    7
    Quote Originally Posted by alf55 View Post
    The user's "umask" value defines the default permissions that will be applied to directories and file. By the way files should never be defaulted to include the execute permission set. Remember that the "x" permission for directories allows browsing within that directory.
    Thank you so much for sharing the answer that has such a logical reasoning attached to it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •