SIMPLE SOLUTIONS

LCHOWN(3PM) - Linux man page online | Library functions

Use the lchown(2) system call from Perl.

Chapter
2017-07-26
Lchown(3pm) User Contributed Perl Documentation Lchown(3pm)

NAME

Lchown - use the lchown(2) system call from Perl

SYNOPSIS

use Lchown; lchown $uid, $gid, 'foo' or die "lchown: $!"; my $count = lchown $uid, $gid, @filenames; # or use Lchown qw(lchown LCHOWN_AVAILABLE); warn "this system lacks the lchown system call\n" unless LCHOWN_AVAILABLE; ... # or use Lchown (); warn "this won't work\n" unless Lchown::LCHOWN_AVAILABLE; Lchown::lchown $uid, $gid, 'foo' or die "lchown: $!";

DESCRIPTION

Provides a perl interface to the "lchown()" system call, on platforms that support it.

DEFAULT EXPORTS

The following symbols are exported be default: lchown (LIST) Like the "chown" builtin, but using the "lchown()" system call so that symlinks will not be followed. Returns the number of files successfully changed. On systems without the "lchown()" system call, "lchown" always returns "undef" and sets "errno" to "ENOSYS" (Function not implemented).

ADDITIONAL EXPORTS

The following symbols are available for export but are not exported by default: LCHOWN_AVAILABLE () Returns true on platforms with the "lchown()" system call, and false on platforms without.

SEE ALSO

"chown" in perlfunc, lchown(2)

AUTHOR

Nick Cleaton <@cleaton.net>
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.
perl v5.26.0 2017-07-26 Lchown(3pm)
This manual Reference Other manuals
Lchown(3pm) referred by
refer to chown(2)
Download raw manual
Main page User Contributed Perl Documentation (+23303) perl v5.26.0 (+3056) № 3 (+68044)
Go top