command to set file access control list.


  setfacl - it is used for granting read,write,execute access to files and directories

  for multiple users and groups

  format setfacl [options] u:username:permission dir/filename

  Eg1 setfacl –m u:jack:rwx /data

  Here it sets acl for the user jack with permissions rwx for the directory data

  Eg2 setfacl –x u:jack /data

  Here it removes acl for jack for directory data

  Eg3 setfacl m d:u:jack:rwx /data1

  Here it sets default acl to directory data for user jack,Here in default acl it inherits the permissions to the subdirectories.To get the file access control list of a file the command used is getfacl.

  format: getfacl [options] filename

  Eg1: getfacl –d /data1

  Here it displays the default access list for the directory data1

  • 26 Users Found This Useful
Was this answer helpful?

Related Articles

what is the command 'ls' used for?

       ls – list directory contents.    ...

for what the command 'tail' is used for?

  tail – print the last 10 lines of the named file.If more than one file is specified...

for what purpose the commad 'du' is used for?

      du- estimates the file space usage.   Format: du [options] [file]...

what is the use of command 'grep'?

    grep- search one or more files that matches a regular pattern  Format:...

'cp' command in linux

    cp - copy files and directories.  Format: cp [options] source...

Powered by WHMCompleteSolution