Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

17. Access Control Lists > The getfacl and setfacl Commands

The getfacl and setfacl Commands

From the shell, we can use the getfacl command to view the ACL on a file.

$ umask 022                         Set shell umask to known state
$ touch tfile                       Create a new file
$ getfacl tfile
# file: tfile
# owner: mtk
# group: users
user::rw-
group::r--
other::r--

From the output of the getfacl command, we see that the new file is created with a minimal ACL. When displaying the text form of this ACL, getfacl precedes the ACL entries with three lines showing the name and ownership of the file. We can prevent these lines from being displayed by specifying the --omit-header option.

Next, we demonstrate that changes to a file’s permissions using the traditional chmod command are carried through to the ACL.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint