Replicating ACLs from one file to another

September 22, 2009 at 6:17 am (Uncategorized) (, )

Say you have a file a with certain modes:permissions:ownerships. You need to apply these same ACLs to another file. What do you do?
There are 2 commands that come handy: ‘getfacl’ and ‘setfacl’

Example: getfacl qmail-scanner-queue.pl.old | setfacl –set-file=- qmail-scanner-queue.p

This will set all the ACLs of qmail-scanner-queue.pl.old to qmail-scanner-queue.pl.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: