Results 1 to 5 of 5

Thread: Use of setfacl not working as expected

  1. #1

    Default Use of setfacl not working as expected

    I used setfacl to set permissions as follows:

    ~/scripts/lib # getfacl files/
    # file: files/
    # owner: root
    # group: root
    # flags: -s-
    user::rwx
    group::rwx
    other::rwx
    default:user::rwx
    default:group::rwx
    default:mask::rwx
    defaultther::rwx
    As you can see all settings lead to permissions 777 but that's not what happens. What happens if I say, touch a file, I get: 666 as this shows:
    :~/scripts/lib # l files/
    total 8
    drwxrwsrwx+ 2 root root 4096 2010-06-04 02:28 ./
    drwxr-xr-x 3 root root 4096 2010-06-04 02:25 ../
    -rw-rw-rw-+ 1 root root 0 2010-06-04 02:23 a.sh
    Same for files that are not obviously scripts such as just a.txt.

    My umask is 0022.

    Does anyone know why this is? Is it changeable for specific directories?

    This is a special world viewed directory required by a piece of software... in other words, no, I am not in a habit of setting file permissions to 777 so please no comments about you shouldn't be using such permissions.

    Truthfully, I can probably get away with permissions 666 and will if I can but right now I just want to know why it's happening this way and how to control it.

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Use of setfacl not working as expected

    Some of the permissions that result from setfacl are extended permissions and are not visible to ls. They have to be viewed with getfacl.

  3. #3

    Default Re: Use of setfacl not working as expected

    Sorry to seem to take forever to reply. I got sidetracked in a big way, again, sorry!

    That makes sense but I figured that either "user::rwx" or "default:user::rwx" since neither specifies a specific user/group/etc. would map directly to the normal permissions. I wonder if any of these settings then map to the normal permissions that ls reads?

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Use of setfacl not working as expected

    chmod/ls work on the standard Unix permission bits, and setfacl works on the ACLs and the twain will not meet.

  5. #5

    Default Re: Use of setfacl not working as expected

    Quote Originally Posted by ken_yap View Post
    ...and the twain will not meet.
    Got it, loud and clear, thanks.

Posting Permissions

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