chmod vs setfacl

Posted on 2006-06-02
Last Modified: 2012-06-27

I am learning Suse and I can not figure out the deal with setfacl.  

Is setfacl just chmod  ?  
Question by:bitmechanic
    LVL 16

    Expert Comment


    This  utility sets Access Control Lists (ACLs) of files and directories.  On the command line, a sequence
    of commands is followed by a sequence of files (which in turn can be followed by another sequence of com-
    mands, ...).

    This  manual  page  documents the GNU version of chmod.  chmod changes the permissions of each given file
    according to mode, which can be either a symbolic representation of changes to make, or an  octal  number
    representing the bit pattern for the new permissions.

    Didi you noticed that setfacl set an access control list and chmod just changes the permission


    Author Comment


    I guess what the problems is that I do not seem to under stand acls in linux.  

    Can someone assist me ?

    Points added :)
    LVL 16

    Accepted Solution


    I had a closer look at setfacl and it more or less abit like chmod accept it also combines the chown which is owner.
    with chmod you cant set the owner of the file you can only set the permissions whereas setfacl can set both the user and the permissions for that user.

    chmod example:

    chmod 755 public_html

    This means that the owner who created the file has read,write and execute and the group as read and execute and everyone else
    has read and execute.

    setfacl example:

    setfacl -m user:damian:rw- public_html

    This hower sets the user damian has read and write access to the public_html even if he didnt create the file.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now