Linux::ACL(3pm)
β¨ Linux::ACL β¨
okay bestie, so this is Linux::ACL β a Perl extension for reading and setting Access Control Lists for files, powered by the libacl linux library. yes you read that right, we're doing ACLs today and we're gonna slay it π
πΈ VERSION πΈ
Version 0.05 β lil baby version number but she's iconic π
π¦ SYNOPSIS π¦
so like, quick vibes-only summary of what the module does. Perhaps a little code snippet. (fr fr, that's the vibe.)
use Linux::ACL;
($acl, $default_acl) = getfacl("path/to/file");
setfacl("path/to/file", $acl [, $default_acl]);
π EXPORT π
setfacl($$;$)
Sets the ACL of the file or directory named by $path to whatever $acl says. important detail alert: if $path names a directory, then the optional $default_acl argument can also be passed to specify the default ACL for that directory. and like... how do you even build the $acl and $default_acl hashes?? go read "ACL structure" bestie, it's all there, no cap π
getfacl($)
Returns a reference to a hash with info about the file's ACL. plot twist: if the file is a directory with a default ACL, then you get back a list, where entry one is a hash reference to the ACL and entry two is a hash reference to the default ACL π«Ά
Need to know how to access these hashes? That's "Accessing ACL structures". Wanna know how the hashes are internally constructed? That's "ACL structure". Both important, both iconic, go read them β¨
π₯ RETURN VALUES π₯
setfaclβ returnsTRUEif it went well andFALSEif it didn't πgetfaclβ if successful, returns a list containing a reference to the hash describing an acl, and (if there's a default acl) a reference to the hash describing that default acl. If unsuccessful,getfaclreturns a null list. devastating. π
Examples π
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
look at that output. she ate. periodt. π
π AUTHOR π
Yuriy Nazarov, "<nazarov at cpan.org>" β ty king π«‘
π BUGS π
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. mutual updates, we love a communicative relationship π
π SUPPORT π
You can find documentation for this module with the perldoc command.
perldoc Linux::ACL
You can also look for information at:
- RT: CPAN's request tracker β <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Linux-ACL>
- AnnoCPAN: Annotated CPAN documentation β <http://annocpan.org/dist/Linux-ACL>
- CPAN Ratings β <http://cpanratings.perl.org/d/Linux-ACL>
- Search CPAN β <http://search.cpan.org/dist/Linux-ACL/>
iykyk, all the links, all the lore π
π§ ACKNOWLEDGEMENTS π§
(no notes here, bestie β this section is literally empty in the original, and honestly? respect for the restraint π«Ά)
π LICENSE AND COPYRIGHT π
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.
and that's the whole page babes!! this masterpiece ships as perl v5.42.3, dated 2026-08-19, no cap π
β¨ β go set some ACLs, you're the main character now π
π¦ where this page comes from
- ubuntu stonking: liblinux-acl-perl 0.05-2build6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms