Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 45

Thread: Force file permissions inside a directory

  1. #21
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Force file permissions inside a directory

    Quote Originally Posted by Morbius1 View Post
    But in the case of a Samba share you have now replaced a public share with a private share requiring all remote users to authentication themselves to make sure they are a member of the correct group.
    Edit:This is not really an accurate way of looking at it. Even the user nobody is the result of authentication. I have anonymous user access to my Samba shares.

    ~~~

    All of my Samba shares work fine with this file system setup. The OP and I have also discussed this point. This is OT, if you want to discuss this PM me.
    Last edited by bab1; May 15th, 2012 at 10:37 PM.
    -BAB1

  2. #22
    Join Date
    Dec 2009
    Beans
    6,771

    Re: Force file permissions inside a directory

    You have a nice day.

  3. #23
    Join Date
    Jun 2011
    Beans
    23
    Distro
    Ubuntu

    Re: Force file permissions inside a directory

    Quote Originally Posted by bab1 View Post
    I see it on Black 1 and 2. see the s in the line?

    Now we need to chmod file system with
    Code:
    chmod -R u=rwXs,g=rwXs,o=rX la "Black 1"
    Don't forget the "" (like "Black 1" and "Black 2")

    Edit: Did you put all the users in the users group?
    I put all of my users in the users group yes.

    When running the above code, I got errors in changing the files/directories I'm not the owner of:
    Code:
    chmod: chaing permissions of {file}: Operation not permitted
    I tried running the code in sudo and it gave me this error:
    Code:
    chmod: cannot access 'la': No such file or directory
    Other than that the code ran just fine

  4. #24
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Force file permissions inside a directory

    Quote Originally Posted by AbsenteeSurgeon View Post
    I put all of my users in the users group yes.

    When running the above code, I got errors in changing the files/directories I'm not the owner of:
    Code:
    chmod: chaing permissions of {file}: Operation not permitted
    I tried running the code in sudo and it gave me this error:
    Code:
    chmod: cannot access 'la': No such file or directory
    Other than that the code ran just fine
    Dang cut 'n paste. it's from a script I have. You should use
    Code:
    sudo chmod -R u=rwXs,g=rwXs,o=rX "Black 1"
    -BAB1

  5. #25
    Join Date
    Jun 2011
    Beans
    23
    Distro
    Ubuntu

    Re: Force file permissions inside a directory

    Quote Originally Posted by bab1 View Post
    Dang cut 'n paste. it's from a script I have. You should use
    Code:
    sudo chmod -R u=rwXs,g=rwXs,o=rX "Black 1"
    Alright, that command successfully ran for both of the hard drives.

  6. #26
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Force file permissions inside a directory

    Quote Originally Posted by AbsenteeSurgeon View Post
    Alright, that command successfully ran for both of the hard drives.
    What does it look like in the subdirectories? You should see all the files and directories with the group ownership as users and the directories as 775 with sgid. Did this happen? Post some output for some of this
    Code:
    ls -lt subdir
    ls -lt subdir/anothersubdir
    Try and look at the subdirectories from a remote machine.
    -BAB1

  7. #27
    Join Date
    Jun 2011
    Beans
    23
    Distro
    Ubuntu

    Re: Force file permissions inside a directory

    Quote Originally Posted by bab1 View Post
    What does it look like in the subdirectories? You should see all the files and directories with the group ownership as users and the directories as 775 with sgid. Did this happen? Post some output for some of this
    Code:
    ls -lt subdir
    ls -lt subdir/anothersubdir
    Try and look at the subdirectories from a remote machine.
    All of the directories I looked at were basically identical, here's small sample:

    Code:
    drwsrwsr-x 360 scott users 16384 May 15 10:58 Music 
    drwsrwsr-x   2 scott users 16384 May 13 20:48 lost+found 
    drwsrwsr-x  10 scott users  4096 May 13 14:53 Systems 
    drwsrwsr-x  28 scott users  4096 May 10 15:30 Movies
    Logging in from FTP works, and I can successfully navigate through all the appropriate directories

  8. #28
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Force file permissions inside a directory

    Quote Originally Posted by AbsenteeSurgeon View Post
    All of the directories I looked at were basically identical, here's small sample:

    Code:
    drwsrwsr-x 360 scott users 16384 May 15 10:58 Music 
    drwsrwsr-x   2 scott users 16384 May 13 20:48 lost+found 
    drwsrwsr-x  10 scott users  4096 May 13 14:53 Systems 
    drwsrwsr-x  28 scott users  4096 May 10 15:30 Movies
    Logging in from FTP works, and I can successfully navigate through all the appropriate directories
    ...and the the files all have 664 as the perms with the group users?

    I would chown the lost+found directory recursively back to root:root
    -BAB1

  9. #29
    Join Date
    Jun 2011
    Beans
    23
    Distro
    Ubuntu

    Re: Force file permissions inside a directory

    Quote Originally Posted by bab1 View Post
    ...and the the files all have 664 as the perms with the group users?

    I would chown the lost+found directory recursively back to root:root
    Here's what a typical file looks like: (all of them look the same)

    Code:
    -rwsrwsr-x 1 barry users 4096 May 15 12:25 {filename}
    And I chown'd the lost+found directories back to root:root.

  10. #30
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Force file permissions inside a directory

    Quote Originally Posted by AbsenteeSurgeon View Post
    Here's what a typical file looks like: (all of them look the same)

    Code:
    -rwsrwsr-x 1 barry users 4096 May 15 12:25 {filename}
    And I chown'd the lost+found directories back to root:root.
    And now on to Samba. Do all of your users have both a user and samba user on the server? Does Samba work as you want it to?
    -BAB1

Page 3 of 5 FirstFirst 12345 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
  •