getfacl and setfacl – Unix Access Control (acl) Tool

Today’s topic is all about Access List… For Unix and Unix-like system, the usual command to set the file permission is the ‘chmod’ command. However there are instances that we need more flexibility in giving access and control for files and folders. Get it? Access and Control? In this situation, there is a file utility built in Unix called ‘getfacl‘ and ‘setfacl‘.


getfacl
is a file utility for viewing the access control list information associated with a file or directory.

For a memory aid, you can think of ‘getfacl’ as “Get File ACL“.. ACL being Access Control List.

Access control lists are extended attributes added to most major file systems in the 2.6 kernel to improve ability to control the access of files. They allow permissions to be set for individual groups and users and not just the owning user, owning group, and all other users.

setfacl is a command that allows you to set the Access Control List information for a file or directory.

Access control lists are extended attributes added to most major file systems in the 2.6 kernel to improve ability to control the access of files. They allow permissions to be set for individual groups and users and not just the owning user, owning group, and all other users.

You can read man pages for both getfacl and setfacl for more information.

getfacl and setfacl example….

Here’s an example of using the basic funtion of getfacl and setfacl

# getfacl

#setfacl

setfacl -m default:user::rwx,default:group::r-x,default:other:r-x,default:mask:rwx /u06/OneSource/datapump_dbdump

setfacl -m default:user:rcodapp1:r-x,default:group:r-x,default:other:—,default:mas:rwx /u06/OneSouce/datapump_dbdump

ZFS Cheat Sheet Including Zpool, Quotas and Reservations

Sorry for the long title post. I just want to easily distinguish this post from my other ZFS post. The reason? For this week, I’ll be working on a server with ZFS filesystem and looks like the SAs for the servers is not yet familiar with the filesystem. I am the newest member of the … Continue reading

Limesurvey PHPSurveyor

LimeSurvey (formerly PHPSurveyor) is a Webapplication that interacts with MySQL, MSSQL, orPostgres to develop surveys, publish surveys, andcollect responses to surveys. Once a survey has been created, data can be inserted into the survey either by a “pretty” public screen which presents each question one at a time, or by a quick and nasty data … Continue reading

2 Newest WordPress Plugin in Sysadmindayph

There’s this 2 new WordPress plugin here in Sysadmindayph dot com (the newest that I installed at least). I just want to share this one for the readers of this blog who is also WordPress user. The two new plugins here are: SEO Smart Link Broken Link Checker SEO Smart Link – SEO Smart Links … Continue reading

Veritas Volume Manager VxVM Basics Commands Cheats

Veritas Volume Manager VxVM Basics Commands Cheats.. The authority site for this topic, the VXVM on VXFS, if you do a Google search for any tutorial or command cheat sheet is Cuddletech. I want to post… say, borrowing, the content of that page to this post for my own personal reference… Love your own page … Continue reading

SVM: Determine Free Space on Soft Partition

SVM: Determine Free Space on Soft Partition , we use the metastat -c command… [root@localhost] /work/users> metastat -c d103 d103 p 32GB d100 d100 m 68GB d101 d102 d101 s 68GB c1t2d0s0 d102 s 68GB c1t3d0s0 [root@localhost] /work/users> metastat -p d103 d103 -p d100 -o 32 -b 58720256 -o 127926432 -b 8388608 d100 -m d101 … Continue reading

BMC/Veritas Netbackup Daemon (bpcd bprd) Restart

Here’s some tips in bouncing off NBU client daemon. BMC Netbackup (formerly with Veritas apparently) may have a number of ways to accomplish this (specially if you’re not the backup admin) and depending on the version of the Netbackup software. The following general guidelines can be used to determine if a restart of NetBackup is … Continue reading

Metastat Needs Maintenance Metareplace

Guilty! Putting all those Metastat keywords on one subject, that’s me! ANyway, I don’t want to stale this blog so once in a while I’m going to be posting some bits and pieces of Unix tools/tips.. and here’s a new one about SVM… Responding to Disk Errors courtesy of BigAdmin!

Send Break on XSCF – Sun M5000 Servers

From our last post about XSCF Cheat sheet, we put there some commands on an XSCF management interface card. I thought that was the most common one, but we forgot to put in how to send ‘break’ to the host console! Here’s how: