Linux::ACL(3pm) | User Contributed Perl Documentation | Linux::ACL(3pm) |
Linux::ACL - Perl extension for reading and setting Access Control Lists for files by libacl linux library.
Version 0.05
Quick summary of what the module does.
Perhaps a little code snippet.
use Linux::ACL; ($acl, $default_acl) = getfacl("path/to/file"); setfacl("path/to/file", $acl [, $default_acl]);
getfacl example
use Linux::ACL; use Data::Dumper; my @a = getfacl("/tmp"); print Dumper \@a;
prints:
$VAR1 = [ { 'uperm' => { 'w' => 1, 'r' => 1, 'x' => 1 }, 'gperm' => { 'w' => 1, 'r' => 1, 'x' => 1 }, 'other' => { 'w' => 1, 'r' => 1, 'x' => 1 } } ];
setfacl example
use Linux::ACL; setfacl("/mnt/testacl/d", { uperm=>{r=>1,w=>1,x=>1}, gperm=>{r=>1,w=>1,x=>1}, other=>{r=>1,w=>0,x=>1}, mask=>{r=>1,w=>1,x=>1}, group=>{ 123456=>{r=>1,w=>1,x=>1} } }, { uperm=>{r=>1,w=>1,x=>1}, gperm=>{r=>1,w=>1,x=>1}, other=>{r=>1,w=>1,x=>1}, mask=>{r=>1,w=>1,x=>1} }); system("getfacl /mnt/testacl/d");
prints:
$ getfacl d # file: d # owner: user # group: user user::rwx group::rwx group:123456:rwx mask::rwx other::r-x default:user::rwx default:group::rwx default:mask::rwx default:other::rwx
Yuriy Nazarov, "<nazarov at cpan.org>"
Please report any bugs or feature requests to "bug-linux-acl at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Linux-ACL>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Linux::ACL
You can also look for information at:
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Linux-ACL>
<http://annocpan.org/dist/Linux-ACL>
<http://cpanratings.perl.org/d/Linux-ACL>
<http://search.cpan.org/dist/Linux-ACL/>
Copyright 2013 Yuriy Nazarov.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
2022-10-19 | perl v5.36.0 |