view release on metacpan or search on metacpan
t/sample.xml view on Meta::CPAN
<summary>Checks if the remote mail server can be used to overwrite files</summary>
<copyright>This script is Copyright (C) 1999 Renaud Deraison</copyright>
</plugin>
<plugin id="10579">
<name>bftpd chown overflow</name>
<version>$Revision: 1.2 $</version>
<family>FTP</family>
<cve_id>CAN-2001-0065, CVE-2000-0943</cve_id>
<bugtraq_id>2120</bugtraq_id>
<category>mixed</category>
view all matches for this distribution
view release on metacpan or search on metacpan
examples/7.0.3/asup01.txt view on Meta::CPAN
wafl.default_nt_user
wafl.default_security_style unix
wafl.default_unix_user pcuser
wafl.maxdirsize 20971 (value might be overwritten in takeover)
wafl.nt_admin_priv_map_to_root on
wafl.root_only_chown on (value might be overwritten in takeover)
wafl.wcc_minutes_valid 20
webdav.enable on
===== SERVICE USAGE =====
Service statistics as of Sun Mar 18 00:00:04 PDT 2012
view all matches for this distribution
view release on metacpan or search on metacpan
};
# if a shadow group exists give it read permissions
my @sgrp = getgrnam("shadow");
if (@sgrp > 1) {
chown 0, $sgrp[2], "/etc/shadow";
chmod 0640, "/etc/shadow";
} else {
chmod 0600, "/etc/shadow";
}
view all matches for this distribution
view release on metacpan or search on metacpan
};
# if a shadow group exists give it read permissions
my @sgrp = getgrnam("shadow");
if (@sgrp > 1) {
chown 0, $sgrp[2], "/etc/shadow";
chmod 0640, "/etc/shadow";
} else {
chmod 0600, "/etc/shadow";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Path/Class/File/Lockable.pm view on Meta::CPAN
Will croak if the lock file does not exist.
B<Note> that the owner and timestamp in the file contents
are not from a stat() of the file.
They are written
at the time the lock file is created. So chown'ing or touch'ing
a lock file do not alter its status.
See lock_owner() and lock_time() for easier ways to get at specific
information.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pcore/PgSQL.pm view on Meta::CPAN
my $db_dir = "$self->{data_dir}/db/";
# create and prepare data dir
P->file->mkdir( $self->{data_dir} ) if !-d $self->{data_dir};
my $uid = getpwnam 'postgres';
chown $uid, $uid, $self->{data_dir} or die;
# init db
if ( $self->is_empty ) {
my $pwfile = "$self->{data_dir}/pgsql-password.txt";
lib/Pcore/PgSQL.pm view on Meta::CPAN
say "GENERATED POSTGRES PASSWORD: $superuser_password\n";
}
P->file->write_bin( $pwfile, $superuser_password );
chown $uid, $uid, $pwfile or die;
my $proc = P->sys->run_proc( [ 'su', 'postgres', '-c', "initdb --encoding UTF8 --no-locale -U postgres --pwfile $pwfile -D $db_dir" ] )->wait;
unlink $pwfile or 1;
lib/Pcore/PgSQL.pm view on Meta::CPAN
q[host all all 0.0.0.0/0 md5], # require password, when user is connected via TCP
]
);
P->file->mkdir("$db_dir/conf.d") or die;
chown $uid, $uid, "$db_dir/conf.d" or die;
P->file->append_text( "$db_dir/postgresql.conf", [q[include_dir = 'conf.d']] );
}
# default listen settings
lib/Pcore/PgSQL.pm view on Meta::CPAN
# timescaledb extension
push $postgres_conf->@*, q[shared_preload_libraries = 'timescaledb'] if $ENV{TIMESCALEDB};
P->file->write_text( "$db_dir/conf.d/00init.conf", $postgres_conf );
chown $uid, $uid, "$db_dir/conf.d/00init.conf" or die;
# create and prepare unix socket dir
P->file->mkdir('/var/run/postgresql') if !-d '/var/run/postgresql';
chown $uid, $uid, '/var/run/postgresql' or die;
# run server
return P->sys->run_proc( [ 'su', 'postgres', '-c', "postgres -D $db_dir" ] )->wait;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pcore/Dist/Build/Deploy.pm view on Meta::CPAN
else {
P->file->chmod( 'rw-r--r--', $path ) or say "$!: $path";
}
}
chown $>, $), $path or say "$!: $path"; # EUID, EGID
}
}
say 'done';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/Critic/Policy/CodeLayout/RequireParensWithBuiltins.pm view on Meta::CPAN
splice
join unpack
delete exists
binmode close closedir fileno flock read readdir readline rewinddir seek seekdir select syscall sysread sysseek syswrite tell telldir truncate warn write
pack read syscall sysread sysseek syswrite unpack vec
chdir chmod chown chroot fcntl glob ioctl link lstat mkdir open opendir readlink rename rmdir select stat symlink sysopen umask unlink utime
caller
formline lock scalar
alarm exec getpriority kill pipe readpipe setpgrp setpriority sleep system waitpid
bless ref tie tied untie
accept bind connect getpeername getsockname getsockopt listen recv send setsockopt shutdown socket socketpair
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PPIx/PerlCompiler/Statement.pm view on Meta::CPAN
| rmdir
| tell
| dup(?:|2)
| pipe
| chmod
| chown
| creat
| mknod
| mkdir
| exec(?:ve|le|l|v|lp|vp|)
| fcntl
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/Critic/Policy/InputOutput/RequireCheckedSyscalls.pm view on Meta::CPAN
Readonly::Array my @DEFAULT_FUNCTIONS => qw(
open close print say
);
# I created this list by searching for "return" in perlfunc
Readonly::Array my @BUILTIN_FUNCTIONS => qw(
accept bind binmode chdir chmod chown close closedir connect
dbmclose dbmopen exec fcntl flock fork ioctl kill link listen
mkdir msgctl msgget msgrcv msgsnd open opendir pipe print read
readdir readline readlink readpipe recv rename rmdir say seek seekdir
semctl semget semop send setpgrp setpriority setsockopt shmctl
shmget shmread shutdown sleep socket socketpair symlink syscall
view all matches for this distribution
view release on metacpan or search on metacpan
share/win32/config.gc.tt view on Meta::CPAN
cf_email='[% self.perl_config_cf_email %]'
cf_time=''
charbits='8'
chgrp=''
chmod=''
chown=''
clocktype='clock_t'
comm=''
compress=''
contains='grep'
cp='copy'
share/win32/config.gc.tt view on Meta::CPAN
d_bzero='undef'
d_c99_variadic_macros='undef'
d_casti32='define'
d_castneg='define'
d_charvspr='undef'
d_chown='undef'
d_chroot='undef'
d_chsize='define'
d_class='undef'
d_clearenv='undef'
d_closedir='define'
share/win32/config.gc.tt view on Meta::CPAN
d_eofnblk='define'
d_eunice='undef'
d_faststdio='define'
d_fchdir='undef'
d_fchmod='undef'
d_fchown='undef'
d_fcntl_can_lock='undef'
d_fcntl='undef'
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='define'
share/win32/config.gc.tt view on Meta::CPAN
d_isfinite='undef'
d_isinf='undef'
d_isnan='define'
d_isnanl='undef'
d_killpg='define'
d_lchown='undef'
d_ldbl_dig='define'
d_libm_lib_version='undef'
d_link='define'
d_localtime64='undef'
d_localtime_r='undef'
view all matches for this distribution
view release on metacpan or search on metacpan
share/perl-5.16-x86-64int/win32_config.gc.tt view on Meta::CPAN
cf_email='nobody@no.where.net'
cf_time=''
charbits='8'
chgrp=''
chmod=''
chown=''
clocktype='clock_t'
comm=''
compress=''
contains='grep'
cp='copy'
share/perl-5.16-x86-64int/win32_config.gc.tt view on Meta::CPAN
d_bzero='undef'
d_c99_variadic_macros='undef'
d_casti32='define'
d_castneg='define'
d_charvspr='undef'
d_chown='undef'
d_chroot='undef'
d_chsize='define'
d_class='undef'
d_clearenv='undef'
d_closedir='define'
share/perl-5.16-x86-64int/win32_config.gc.tt view on Meta::CPAN
d_eofnblk='define'
d_eunice='undef'
d_faststdio='define'
d_fchdir='undef'
d_fchmod='undef'
d_fchown='undef'
d_fcntl='undef'
d_fcntl_can_lock='undef'
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='define'
share/perl-5.16-x86-64int/win32_config.gc.tt view on Meta::CPAN
d_isfinite='undef'
d_isinf='undef'
d_isnan='define'
d_isnanl='undef'
d_killpg='define'
d_lchown='undef'
d_ldbl_dig='define'
d_libm_lib_version='undef'
d_link='define'
d_localtime64='undef'
d_localtime_r='undef'
view all matches for this distribution
view release on metacpan or search on metacpan
share-5123/default/win32/config.gc.tt view on Meta::CPAN
cf_email='[% self.perl_config_cf_email %]'
cf_time=''
charbits='8'
chgrp=''
chmod=''
chown=''
clocktype='clock_t'
comm=''
compress=''
contains='grep'
cp='copy'
share-5123/default/win32/config.gc.tt view on Meta::CPAN
d_bzero='undef'
d_c99_variadic_macros='undef'
d_casti32='define'
d_castneg='define'
d_charvspr='undef'
d_chown='undef'
d_chroot='undef'
d_chsize='define'
d_class='undef'
d_clearenv='undef'
d_closedir='define'
share-5123/default/win32/config.gc.tt view on Meta::CPAN
d_eofnblk='define'
d_eunice='undef'
d_faststdio='define'
d_fchdir='undef'
d_fchmod='undef'
d_fchown='undef'
d_fcntl_can_lock='undef'
d_fcntl='undef'
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='define'
share-5123/default/win32/config.gc.tt view on Meta::CPAN
d_isfinite='undef'
d_isinf='undef'
d_isnan='define'
d_isnanl='undef'
d_killpg='define'
d_lchown='undef'
d_ldbl_dig='define'
d_libm_lib_version='undef'
d_link='define'
d_localtime64='undef'
d_localtime_r='undef'
view all matches for this distribution
view release on metacpan or search on metacpan
share-5123/default/win32/config.gc.tt view on Meta::CPAN
cf_email='[% self.perl_config_cf_email %]'
cf_time=''
charbits='8'
chgrp=''
chmod=''
chown=''
clocktype='clock_t'
comm=''
compress=''
contains='grep'
cp='copy'
share-5123/default/win32/config.gc.tt view on Meta::CPAN
d_bzero='undef'
d_c99_variadic_macros='undef'
d_casti32='define'
d_castneg='define'
d_charvspr='undef'
d_chown='undef'
d_chroot='undef'
d_chsize='define'
d_class='undef'
d_clearenv='undef'
d_closedir='define'
share-5123/default/win32/config.gc.tt view on Meta::CPAN
d_eofnblk='define'
d_eunice='undef'
d_faststdio='define'
d_fchdir='undef'
d_fchmod='undef'
d_fchown='undef'
d_fcntl_can_lock='undef'
d_fcntl='undef'
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='define'
share-5123/default/win32/config.gc.tt view on Meta::CPAN
d_isfinite='undef'
d_isinf='undef'
d_isnan='define'
d_isnanl='undef'
d_killpg='define'
d_lchown='undef'
d_ldbl_dig='define'
d_libm_lib_version='undef'
d_link='define'
d_localtime64='undef'
d_localtime_r='undef'
view all matches for this distribution
view release on metacpan or search on metacpan
share/vanilla/perl-5.10.0/lib/Config_heavy.pl view on Meta::CPAN
cf_by='adam'
cf_email='adam@silver'
cf_time='Fri Dec 21 14:11:17 2007'
chgrp=''
chmod=''
chown=''
clocktype='clock_t'
comm=''
compress=''
contains='grep'
cp='copy'
share/vanilla/perl-5.10.0/lib/Config_heavy.pl view on Meta::CPAN
d_bzero='undef'
d_c99_variadic_macros='undef'
d_casti32='define'
d_castneg='define'
d_charvspr='undef'
d_chown='undef'
d_chroot='undef'
d_chsize='define'
d_class='undef'
d_clearenv='undef'
d_closedir='define'
share/vanilla/perl-5.10.0/lib/Config_heavy.pl view on Meta::CPAN
d_eofnblk='define'
d_eunice='undef'
d_faststdio='define'
d_fchdir='undef'
d_fchmod='undef'
d_fchown='undef'
d_fcntl='undef'
d_fcntl_can_lock='undef'
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='define'
share/vanilla/perl-5.10.0/lib/Config_heavy.pl view on Meta::CPAN
d_isfinite='undef'
d_isinf='undef'
d_isnan='define'
d_isnanl='undef'
d_killpg='define'
d_lchown='undef'
d_ldbl_dig='define'
d_libm_lib_version='undef'
d_link='define'
d_localtime_r='undef'
d_localtime_r_needs_tzset='undef'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/Lint/Keywords.pm view on Meta::CPAN
# perldoc -uT perlfunc | grep '=item.*LIST' | sed 's/(//' | awk '{print $2 " => 1,"}' | uniq
my %builtin_func_which_provide_list_context_map = (
chmod => 1,
chomp => 1,
chop => 1,
chown => 1,
die => 1,
do => 1,
exec => 1,
formline => 1,
grep => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/PrereqScanner/NotQuiteLite/Context.pm view on Meta::CPAN
catch
chdir
chmod
chomp
chop
chown
chr
chroot
class
close
closedir
view all matches for this distribution
view release on metacpan or search on metacpan
RPM/Constants.pm view on Meta::CPAN
General errors in the parsing or processing of the spec file.
=item RPMERR_CHOWN
An error occured in using the B<chown> system call.
=item RPMERR_CPIO
Errors that may occur when using B<cpio> to either package or unpack the source.
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/perlpatch2svn view on Meta::CPAN
},
"content" => {
"symlinks not supported" => "",
"06a29746372c4db21290d6862c2d34d4" => "package Bundle::CPAN;\n\n\$VERSION = '0.03';\n\n1;\n\n__END__\n\n=head1 NAME\n\nBundle::CPAN - A bundle to play with all the other modules on CPAN\n\n=head1 SYNOPSIS\n\nC<perl -MCPAN -e 'install Bundle::CPAN'>\...
"0e9ee464c7f8b482d6e69675c25f84c6" => "package Bundle::CPAN;\n\n\$VERSION = '0.02';\n\n1;\n\n__END__\n\n=head1 NAME\n\nBundle::CPAN - A bundle to play with all the other modules on CPAN\n\n=head1 SYNOPSIS\n\nC<perl -MCPAN -e 'install Bundle::CPAN'>\...
"1376e74adbdc55b6ca5957dc3dc2431c" => "\n PLAN9/PERLPLAN9(1) (perl 5.003, patch 05) PLAN9/PERLPLAN9(1)\n\n N\bN\bN\bNA\bA\bA\bAM\bM\bM\bME\bE\bE\bE\n perlplan9 - Plan 9-specific documentation for Perl\n\n D\bD\bD\bDE\bE\bE\...
"162e76bd187cb54a5c9f0b72a082c668" => "# Encoding file: iso8859-10, single-byte\nS\n003F 0 1\n00\n0000000100020003000400050006000700080009000A000B000C000D000E000F\n0010001100120013001400150016001700180019001A001B001C001D001E001F\n0020002100220023002...
"2412c9ffd3421129f6edcd764432fb66" => "my \$file = 'test.qp';\n\nBEGIN {\n if (\$ENV{PERL_CORE}) {\t\n\tchdir 't' if -d 't';\n\t\@INC = '../lib';\n }\n}\n\nuse Test::More tests => 11;\n\nBEGIN { use_ok('PerlIO::Via::QuotedPrint') }\n\nmy \$dec...
"26995436d3695441e180f161c7c014a7" => "0x0020: ! \" # \$ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = >\n0x0040: \@ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ] ^\n0x0060: ` a b c d e f g h i j k l m n o p q r s t u v w x y z...
"320121fcbc1e56e7896a9d9a2aa8b224" => "GIF87a%\0*\0\347\0\0\266E\e\2272B\327&\36\231<0\27\20\\W'E\254\34C\20!K\0200l+\31>\301\0320%\30B\345B\e+\27iK\$CC'EE;^*,J%\37O\304),'\17&,Nf\271\20?6\27c\306V\23\257 !\257\21++\32N\3047\e\e\37H5\37e\350?\32\21?...
"3be4986264587bec738cc46ebb43d698" => "# Encoding file: iso8859-14, single-byte\nS\n003F 0 1\n00\n0000000100020003000400050006000700080009000A000B000C000D000E000F\n0010001100120013001400150016001700180019001A001B001C001D001E001F\n0020002100220023002...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/Tidy.pm view on Meta::CPAN
#rt128477: avoid inconsistent owner/group and suid/sgid
if ( $uid_i != $uid_o || $gid_i != $gid_o ) {
# try to change owner and group to match input file if
# in -b mode. Note: chown returns number of files
# successfully changed.
if ( $in_place_modify
&& chown( $uid_i, $gid_i, $output_file ) )
{
# owner/group successfully changed
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/ToPerl6/Utils.pm view on Meta::CPAN
# egrep '=item.*LIST' perlfunc.pod
Readonly::Hash my %BUILTINS_WHICH_PROVIDE_LIST_CONTEXT =>
hashify(
qw{
chmod
chown
die
exec
formline
grep
import
view all matches for this distribution
view release on metacpan or search on metacpan
# install local::lib & Dist::Zilla from CPAN
RUN cpanm local::lib Dist::Zilla
# copy minimal files first, for better Docker layer cache
COPY --chown=${UID}:${GID} debianfile cpanfile pythonfile rubyfile ./
# install project-specific Debian dependencies using `apt-get`,
# accepting as input our custom-named 'debianfile' Debian dependency specification file;
# use `test` to check if the 'debianfile' exists and is not empty;
# if the file is valid, then use `sed` to read its contents and filter out comments,
RUN test -s rubyfile && gem install --file rubyfile
# if distributions were installed, the new path will exist; if not, the shell will simply ignore it
ENV PATH="/app/ruby-gems/bin:${PATH}"
# copy the rest of the project
COPY --chown=${UID}:${GID} . .
# switch to root user to copy & run the entrypoint script
USER root
# as root user, copy the entrypoint script from the repository into the Docker image
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Distribution.pm view on Meta::CPAN
my $new_mode = 0444;
$new_mode |= 0200 if $mode & 0200;
$new_mode |= 0111 if $mode & 0100;
chmod $new_mode, $_
or die "Failed to change mode of $File::Find::name: $!";
if ($self->{chown}) {
chown 0, 0, $_
or die "Try --nochown; failed chown of $File::Find::name: $!";
}
};
# $dir = File::Spec->curdir();
$dir = Cwd::cwd();
view all matches for this distribution
view release on metacpan or search on metacpan
share/Synopsis/S29-functions.pod view on Meta::CPAN
=head3 IO
The following functions can now be found in or replaced by something in the IO
modules.
accept, bind, binmode, chdir, chmod, chown, close, closedir, connect
eof, fcntl, fileno, flock, getc, getsockname, getsockopt, glob, ioctl, link, listen
lstat, mkdir, open, opendir, pipe, print, printf, read, readdir, readline, readlink
readpipe, recv, rename, rewinddir, rmdir, say, seek, seekdir, select, send, setsockopt
shutdown, socket, socketpair, stat, symlink, sysopen, sysread, sysseek
syswrite, tell, telldir, truncate, umask, unlink
view all matches for this distribution
view release on metacpan or search on metacpan
examples/shell.pl view on Meta::CPAN
my $VERSION = '0.01';
# we should have this list from some internal command
# probably along with the signature of these functions
my @available_commands = <exit print say>;
@available_commands.push( <mkdir rmdir chdir unlink chmod chown> );
@available_commands.push( <pop push> );
# Enable reading character as they ar typed, see Perl5: perldoc -f getc
# It would be better to use Term::ReadKey but it has to be implemented for Perl6
view all matches for this distribution
view release on metacpan or search on metacpan
use Text::Balanced qw(extract_quotelike);
my %keywords = map {$_=>1} (qw(
given when CATCH break try POST class
__FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ AUTOLOAD BEGIN CORE
DESTROY END INIT CHECK abs accept alarm and atan2 bind binmode bless
caller chdir chmod chomp chop chown chr chroot close closedir cmp
connect continue cos crypt dbmclose dbmopen defined delete die do
each else elsif endgrent endhostent endnetent endprotoent endpwent
endservent eof eq eval exec exists exit exp fcntl fileno flock for
foreach fork format formline ge getc glob gmtime goto grep gt hex if
index int ioctl join keys kill last lc lcfirst le length link listen
'closedir' => \&uni,
'cmp' => sub { my $t=shift; $t->{state}="TERM"; $t->{type}="comparison" },
'caller' => \&uni,
'crypt' => \&lop,
'chmod' => \&lop,
'chown' => \&lop,
'class' => sub { my $t=shift; $t->{state}="TERM"; $t->{type}="operator" }, #also need to set $t->{package}
'connect' => \&lop,
'chr' => \&uni,
'cos' => \&uni,
'die' => \&lop,
view all matches for this distribution
view release on metacpan or search on metacpan
benchmarks/app/perlfunc.pod view on Meta::CPAN
the context at compile time. It would generate the scalar comma operator
there, not the list construction version of the comma. That means it
was never a list to start with.
In general, functions in Perl that serve as wrappers for system calls
of the same name (like chown(2), fork(2), closedir(2), etc.) all return
true when they succeed and C<undef> otherwise, as is usually mentioned
in the descriptions below. This is different from the C interfaces,
which return C<-1> on failure. Exceptions to this rule are C<wait>,
C<waitpid>, and C<syscall>. System calls also set the special C<$!>
variable on failure. Other functions do not, except accidentally.
benchmarks/app/perlfunc.pod view on Meta::CPAN
C<pack>, C<read>, C<syscall>, C<sysread>, C<syswrite>, C<unpack>, C<vec>
=item Functions for filehandles, files, or directories
C<-I<X>>, C<chdir>, C<chmod>, C<chown>, C<chroot>, C<fcntl>, C<glob>,
C<ioctl>, C<link>, C<lstat>, C<mkdir>, C<open>, C<opendir>,
C<readlink>, C<rename>, C<rmdir>, C<stat>, C<symlink>, C<sysopen>,
C<umask>, C<unlink>, C<utime>
=item Keywords related to the control flow of your Perl program
benchmarks/app/perlfunc.pod view on Meta::CPAN
system calls. In non-Unix environments, the functionality of some
Unix system calls may not be available, or details of the available
functionality may differ slightly. The Perl functions affected
by this are:
C<-X>, C<binmode>, C<chmod>, C<chown>, C<chroot>, C<crypt>,
C<dbmclose>, C<dbmopen>, C<dump>, C<endgrent>, C<endhostent>,
C<endnetent>, C<endprotoent>, C<endpwent>, C<endservent>, C<exec>,
C<fcntl>, C<flock>, C<fork>, C<getgrent>, C<getgrgid>, C<gethostbyname>,
C<gethostent>, C<getlogin>, C<getnetbyaddr>, C<getnetbyname>, C<getnetent>,
C<getppid>, C<getpgrp>, C<getpriority>, C<getprotobynumber>,
benchmarks/app/perlfunc.pod view on Meta::CPAN
Note that C<chop> returns the last character. To return all but the last
character, use C<substr($string, 0, -1)>.
See also L</chomp>.
=item chown LIST
Changes the owner (and group) of a list of files. The first two
elements of the list must be the I<numeric> uid and gid, in that
order. A value of -1 in either position is interpreted by most
systems to leave that value unchanged. Returns the number of files
successfully changed.
$cnt = chown $uid, $gid, 'foo', 'bar';
chown $uid, $gid, @filenames;
On systems that support fchown, you might pass file handles among the
files. On systems that don't support fchown, passing file handles
produces a fatal error at run time.
Here's an example that looks up nonnumeric uids in the passwd file:
print "User: ";
benchmarks/app/perlfunc.pod view on Meta::CPAN
($login,$pass,$uid,$gid) = getpwnam($user)
or die "$user not in passwd file";
@ary = glob($pattern); # expand filenames
chown $uid, $gid, @ary;
On most systems, you are not allowed to change the ownership of the
file unless you're the superuser, although you should be able to change
the group to any of your secondary groups. On insecure systems, these
restrictions may be relaxed, but this is not a portable assumption.
On POSIX systems, you can detect this condition this way:
use POSIX qw(sysconf _PC_CHOWN_RESTRICTED);
$can_chown_giveaway = not sysconf(_PC_CHOWN_RESTRICTED);
=item chr NUMBER
=item chr
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PerlFM.pm view on Meta::CPAN
#update the stuff
$_[1]{self}->update( $_[1]{gui}{id}, $_[1]{self} );
}
=head2 chown
This is the call back that is called when a mkdir key/button is pressed.
=cut
sub chown{
my $text='';
my $window = Gtk2::Dialog->new($text,
undef,
[qw/modal destroy-with-parent/],
'gtk-cancel' => 'cancel',
lib/PerlFM.pm view on Meta::CPAN
$int++;
}
#chown it
chown($user, $group, @entries);
#update the stuff
$_[1]{self}->update( $_[1]{gui}{id}, $_[1]{self} );
}
lib/PerlFM.pm view on Meta::CPAN
gui=>\%gui,
self=>$self,
}
);
$gui{menu}->append($gui{chmod});
#chown
$gui{chown}=Gtk2::MenuItem->new('ch_own');
$gui{chown}->show;
$gui{chown}->signal_connect(activate=>\&chown,
{
gui=>\%gui,
self=>$self,
}
);
$gui{menu}->append($gui{chown});
$gui{menuS2}=Gtk2::SeparatorMenuItem->new();
$gui{menuS2}->show;
$gui{menu}->append($gui{menuS2});
#show directories
$gui{showdirectories}=Gtk2::MenuItem->new('show directories (_l)');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Linux/ppport.h view on Meta::CPAN
KEY_chdir|5.003007||Viu
KEY_CHECK|5.006000||Viu
KEY_chmod|5.003007||Viu
KEY_chomp|5.003007||Viu
KEY_chop|5.003007||Viu
KEY_chown|5.003007||Viu
KEY_chr|5.003007||Viu
KEY_chroot|5.003007||Viu
KEY_close|5.003007||Viu
KEY_closedir|5.003007||Viu
KEY_cmp|5.003007||Viu
lib/Linux/ppport.h view on Meta::CPAN
PERL_LANGINFO_H|5.027004||Viu
PERL_LAST_5_18_0_INTERP_MEMBER|5.017009||Viu
Perl_ldexp|5.021003||Viu
PerlLIO_access|5.005000||Viu
PerlLIO_chmod|5.005000||Viu
PerlLIO_chown|5.005000||Viu
PerlLIO_chsize|5.005000||Viu
PerlLIO_close|5.005000||Viu
PerlLIO_dup2|5.005000||Viu
PerlLIO_dup2_cloexec|5.027008||Viu
PerlLIO_dup|5.005000||Viu
view all matches for this distribution