Lchown(3pm)
π Lchown(3pm) π
okay bestie, welcome to the Lchown era β it's a User Contributed Perl Documentation page and it's literally here to let you call the lchown(2) system call straight from Perl. No C, no wrappers, just vibes β¨
πΈ NAME πΈ
Lchown</purgle> β use the lchown(2) system call from Perl π«Ά
π SYNOPSIS π
okay so here's the three ways you can show up to this party π
use Lchown;
lchown $uid, $gid, 'foo' or die "lchown: $!";
my $count = lchown $uid, $gid, @filenames;
or, if you want the availability flag too π
use Lchown qw(lchown LCHOWN_AVAILABLE);
warn "this system lacks the lchown system call\n" unless LCHOWN_AVAILABLE;
...
or, if you're feeling feral and want to import absolutely nothing π
use Lchown ();
warn "this won't work\n" unless Lchown::LCHOWN_AVAILABLE;
Lchown::lchown $uid, $gid, 'foo' or die "lchown: $!";
π¦ DESCRIPTION π¦
It gives you a perl interface to the lchown() system call β on platforms that support it. That's it, that's the whole thing, and it eats every single time π
β¨ DEFAULT EXPORTS β¨
These symbols come through by default, no asking required π
lchown(LIST)β It's givingchownbuiltin energy, but it uses thelchown()system call instead, so symlinks do NOT get followed π«π. Returns the number of files it succesfully changed.
β οΈ Heads up, bestie: on systems without thelchown()system call,lchownalways returnsundefand setserrnotoENOSYS(Function not implemented). It will not work. It cannot work. Periodt. π
π ADDITIONAL EXPORTS π
These are available for export but they are not exported by default β you gotta ask nicely π
LCHOWN_AVAILABLE()β Returns true on platforms that have thelchown()system call, and false on platforms that don't. It's literally a vibe check for your OS πβ¨
π SEE ALSO π
"chown"in perlfunclchown(2)
i.e. go read the perlfunc chown entry and the lchown(2) manpage, iykyk π§
π AUTHOR π
Nick Cleaton <nick@cleaton.net> β main character, honestly π«Ά
π COPYRIGHT AND LICENSE π
Copyright 2003-2009 Nick Cleaton, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πΈ
and that's the whole page, bestie β go lchown something (or don't, if your platform said no) ππ¦
sign-off szn: this beautiful thing is perl v5.42.3, dated 2026-08-19, and it answers to the name Lchown(3pm) β¨π
π¦ where this page comes from
- ubuntu stonking: liblchown-perl 1.01-4build6 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms