>> On Sat, 30 Jul 2005 13:17:36 -0400 (EDT), >> Dru <[EMAIL PROTECTED]> said:
D> I've enabled ACL support on a 5.4-RELEASE system and have no problems D> creating and modifying ACLs. However, I can't seem to find a backup D> program that will actually restore the ACLs. I've tried bsdtar, pax, D> and star. Has anyone had any success in backing up and restoring ACLs? According to http://www.onlamp.com/pub/a/bsd/2003/08/14/freebsd_acls.html the archivers/star port supports ACLs; did you use the port or compile from separate source? Apart from that, all I can think of is to save the ACLs using getfacl and then restore them later using something like the script below. -- Karl Vogel I don't speak for the USAF or my company The ultimate result of shielding men from the effects of folly is to fill the world with fools. --Herbert Spencer --------------------------------------------------------------------------- #!/usr/bin/perl # read getfacl output, write setfacl commands. # # Sample input: # #file:f1 # #owner:1001 # #group:1001 # user::rwx # group::r-- # group:mail:rw- # mask::rw- # other::r-- # # #file:f2 # #owner:1001 # #group:1001 # user::rw- # group::r-- # other::r-- # # Sample output: # setfacl -m user::rwx,group::r--,group:mail:rw-,mask::rw-,other::r-- f1 # setfacl -m user::rw-,group::r--,other::r--, f2 $cmd = 'setfacl -m'; $opt = ''; while (<>) { chomp; $file = $1 if /^#file:(.*)/; next if /^#owner:/; next if /^#group:/; if (length($_)) { $opt .= "$_," unless /^#/; } else { chop ($opt); print "$cmd $opt $file\n"; $opt = ''; } } print "$cmd $opt $file\n" if length($opt); exit(0); _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
