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
" unless LCHOWN_AVAILABLE;
...
# or
use Lchown ();
warn "this won't work
" 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 <nick@cleaton.net>
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.
perl v5.14.2 2011-11-15 Lchown(3pm)
Check Out this Related Man Page
explain_lchown_or_die(3) Library Functions Manual explain_lchown_or_die(3)NAME
explain_lchown_or_die - change ownership of a file and report errors
SYNOPSIS
#include <libexplain/lchown.h>
void explain_lchown_or_die(const char *pathname, int owner, int group);
DESCRIPTION
The explain_lchown_or_die function is used to call the lchown(2) system call. On failure an explanation will be printed to stderr,
obtained from explain_lchown(3), and then the process terminates by calling exit(EXIT_FAILURE).
This function is intended to be used in a fashion similar to the following example:
explain_lchown_or_die(pathname, owner, group);
pathname
The pathname, exactly as to be passed to the lchown(2) system call.
owner The owner, exactly as to be passed to the lchown(2) system call.
group The group, exactly as to be passed to the lchown(2) system call.
Returns:
This function only returns on success. On failure, prints an explanation and exits.
SEE ALSO lchown(2)
change ownership of a file
explain_lchown(3)
explain lchown(2) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2008 Peter Miller
explain_lchown_or_die(3)
I am trying to change ownership of a file that I own by using the following command:
chown norfoklm norfolk
norfoklm is the user I am trying to change it to and norfolk is the name of the directory
The error I keep getting is:
chown: norfolk: Not owner
This is on a SUN unix box if... (3 Replies)
I am a total noob assume i know nothing I have dabbed in it a little in the past but that was so long ago i have forgotten it all.
Back story: (short version)
Rented a web server from xenon servers. Need it to Grab some files from another server from xenon (minecraft server) (images of the map)... (4 Replies)
Hi Guru,
I have assignment to create script to compress file as .ZIP with password.
I don't know the command line in AIX. It's very new for me.
I'm try to use zip or tar but I don't have any option for encrypt with password.
Please kindly suggest me.
Thank you very much.
Multidev (7 Replies)