check permissions of all my files! -- find example, short script (Last Comment)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, 2005-05-17 at 15:57 -0500, Bryan J. Smith wrote:
> Also, there is a way to save/apply ACLs as well (using getfacl/setfacl).
> I've been using a variant of this script to save all ACLs into a script
> when backing up, just in case the backup approach doesn't save them
> (e.g., I typically limit my use of ACLs to XFS, because xfsdump
> preserves them, but just in case I use something that cant').

Of course, another option instead of using my script (but is more Linux-
centric, not sure if it's SUS v3 / POSIX 100x-2001 compliant, let alone
it probably doesn't work on other UNIX flavors) is to just use the
"getfacl/setfacl" commands directly -- not only for ACLs, but regular
UNIX permissions as well.

E.g.,  
  $ getfacl -R /abspath > /abspath.acls # Saves UNIX+ACL to file
  $ setfacl --restore=/abspath.acls # Restores UNIX+ACL from file

My older scripts for ACLs were designed for cross-Linux/Irix with XFS.
This seems to work on Linux (I haven't tried older Irix versions),
and possibly any UNIX post-SUSv3/POSIX100x-2001.

-- 
Bryan J. Smith                                 b.j.smith@xxxxxxxx 
----------------------------------------------------------------- 
Beware of those who define their preference in terms of hate of
another option, and not on the positive merits of their selection



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux