BSD DevCenter

oreilly.comSafari Books Online.Conferences.

We've expanded our LAMP news coverage and improved our search! Search for all things LAMP across O'Reilly!

Search
Search Tips

advertisement

Listen Print Discuss Subscribe to BSD Subscribe to Newsletters

Using FreeBSD's ACLs
Pages: 1, 2, 3, 4, 5, 6

Backing Up ACLs

One of the things you need to be aware of if you plan to use ACLs is that most backup utilities will correctly backup files containing ACLs, and even restore those files, but not their ACLs. A good solution to this is to install /usr/ports/archivers/star from the ports collection. If you've ever used tar, it won't take long to train yourself to add a few extra switches to catch all of those ACLs.

In this example, the superuser has made a backup directory for dru outside of her home directory so she can store backups of her home directory.

# mkdir -p /usr/backups/dru
# chmod dru:dru /usr/backups/dru
# exit

Next, dru backs up her home directory, which contains files with ACLs:

% whoami
dru
% cd
% star -cv -Hexustar -acl -f /usr/backups/dru/home.tgz .

Next, dru will try a test restore in a temporary directory in her home directory:

% mkdir ~/tmp
% cd ~/tmp
% star -xv -Hexustar -acl -f home.tgz

Note: If you try to restore to a filesystem that doesn't have ACLs enabled, star will complain but will still restore the files minus the ACLs.

Conclusion

Many users either haven't yet heard of the benefits of ACLs or believe them to be difficult to use. Spend a half an hour showing your users how to use eiciel and star, and they'll wonder how they ever lived without ACLs.

Dru Lavigne is a network and systems administrator, IT instructor, author and international speaker. She has over a decade of experience administering and teaching Netware, Microsoft, Cisco, Checkpoint, SCO, Solaris, Linux, and BSD systems. A prolific author, she pens the popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics.


Read more FreeBSD Basics columns.

Return to the BSD DevCenter


Have another trick for using ACLs? Let us know here.
You must be logged in to the O'Reilly Network to post a talkback.
Post Comment
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Inherit mask?
    2007-04-25 06:57:15  PatrikJ [Reply | View]

    Is it possible to force a specific mask to be set on new files? It seems that the mask is set out from the group permissions on the new file which is determined by umask. What I REALLY want is a specific user to have rwx access on new files/directories no matter what umask there is, but the acl mask always pulls down the effective permissions for that particular user.


Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com