view release on metacpan or search on metacpan
lib/App/Yabsm/Command/Daemon.pm view on Meta::CPAN
# Initialize yabsmd's runtime environment:
#
# * Install the signal handlers that remove the PID file before exiting
# * Create dirs needed for performing snaps, ssh_backups, and local_backups
# * Create the yabsm user and group if they don't already exists
# * If $create_log_file, create /var/log/yabsm if it does not exist and chown it to yabsm:yabsm
# * If $create_pid_file, create the (empty) file /run/yabsmd.pid and chown it to yabsm:yabsm
# * Create the yabsm users SSH keys if they don't already exist
# * Set this processes UID and GID to yabsm:yabsm
arg_count_or_die(3, 3, @_);
lib/App/Yabsm/Command/Daemon.pm view on Meta::CPAN
if ($create_log_file) {
open my $log_fh, '>>', '/var/log/yabsm'
or confess q(yabsm: internal error: cannot open file '/var/log/yabsm' for writing);
close $log_fh;
chown $yabsm_uid, $yabsm_gid, '/var/log/yabsm';
chmod 0644, '/var/log/yabsm';
}
if ($create_pid_file) {
open my $pid_fh, '>', '/run/yabsmd.pid'
or confess q(yabsm: internal error: cannot not open file '/run/yabsmd.pid' for writing);
close $pid_fh;
chown $yabsm_uid, $yabsm_gid, '/run/yabsmd.pid';
chmod 0644, '/run/yabsmd.pid';
}
POSIX::setgid($yabsm_gid);
POSIX::setuid($yabsm_uid);
lib/App/Yabsm/Command/Daemon.pm view on Meta::CPAN
my $priv_key = "$ssh_dir/id_ed25519";
my $pub_key = "$ssh_dir/id_ed25519.pub";
unless (-f $priv_key && -f $pub_key) {
system_or_die('ssh-keygen', '-t', 'ed25519', '-f', $priv_key, '-N', '');
chown $yabsm_uid, $yabsm_gid, $priv_key, $pub_key;
chmod 0600, $priv_key;
chmod 0644, $pub_key;
}
return 1;
view all matches for this distribution
view release on metacpan or search on metacpan
*d = toUPPER(*d);
else if (strEQ(d,"chop"))
*d = toUPPER(*d);
else if (strEQ(d,"chmod"))
*d = toUPPER(*d);
else if (strEQ(d,"chown"))
*d = toUPPER(*d);
ID(d);
case 'd': case 'D':
SNARFWORD;
if (strEQ(d,"do"))
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
my $self = shift;
$self->{home} = $self->env('HOME') if $self->env('HOME');
unless (_writable($self->{home})) {
die "Can't write to cpanm home '$self->{home}': You should fix it with chown/chmod first.\n";
}
$self->{base} = "$self->{home}/work/" . time . ".$$";
File::Path::mkpath([ $self->{base} ], 0, 0777);
view all matches for this distribution
view release on metacpan or search on metacpan
my $self = shift;
$self->{home} = $self->env('HOME') if $self->env('HOME');
unless (_writable($self->{home})) {
die "Can't write to cpanm home '$self->{home}': You should fix it with chown/chmod first.\n";
}
$self->{base} = "$self->{home}/work/" . time . ".$$";
File::Path::mkpath([ $self->{base} ], 0, 0777);
view all matches for this distribution
view release on metacpan or search on metacpan
bin/elsquid view on Meta::CPAN
if ($opts{permissions}) {
my $targetdir = File::Spec->catfile($config{dbhome}, $config{dbsubdir});
my @chown = (
'chown',
'-R',
"$config{user}:$config{group}",
$targetdir
);
say "@chown";
my $result = system( @chown );
}
if ($opts{reload}) {
view all matches for this distribution
view release on metacpan or search on metacpan
ARG KARR_UID=1000
ARG KARR_GID=1000
RUN groupadd -g ${KARR_GID} karr \
&& useradd -m -d /home/karr -u ${KARR_UID} -g ${KARR_GID} -s /bin/sh karr \
&& chown -R ${KARR_UID}:${KARR_GID} /home/karr /work
USER karr
ENTRYPOINT ["karr"]
view all matches for this distribution
view release on metacpan or search on metacpan
bin/org2ical view on Meta::CPAN
my @stat = ref $src eq 'ARRAY' ? @$src : stat($src);
die "Can't stat $src: $!" if !@stat;
chmod $stat[2], $dest
or warn "Can't chmod $dest to " . sprintf("0%o", $stat[2]) . ": $!";
chown $stat[4], $stat[5], $dest
or do {
my $save_err = $!; # otherwise it's lost in the get... calls
warn "Can't chown $dest to " .
(getpwuid($stat[4]))[0] . "/" .
(getgrgid($stat[5]))[0] . ": $save_err";
};
utime $stat[8], $stat[9], $dest
or warn "Can't utime $dest to " .
view all matches for this distribution
view release on metacpan or search on metacpan
=========
sudo make install
test -f ~/.perlall || cp .perlall ~/
sudo mkdir -p /usr/src/perl/blead/perl-git
sudo chown $USER -R /usr/src/perl
cd /usr/src/perl/blead/
as root:
=========
view all matches for this distribution
view release on metacpan or search on metacpan
maint/cip-before-install view on Meta::CPAN
set -ex
cip sudo apt-get update
cip sudo apt-get install libffi-dev
cip sudo chown -R cip.cip /home/cip/dzil
cip exec ./maint/cip-before-install-inside
view all matches for this distribution
view release on metacpan or search on metacpan
bin/plx-packed view on Meta::CPAN
$fatpacked{"App/cpanminus/Dependency.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS_DEPENDENCY';
package App::cpanminus::Dependency;use strict;use CPAN::Meta::Requirements;sub from_prereqs {my($class,$prereqs,$phases,$types)=@_;my@deps;for my$type (@$types){push@deps,$class->from_versions($prereqs->merged_requirements($phases,[$type])->as_st...
APP_CPANMINUS_DEPENDENCY
$fatpacked{"App/cpanminus/script.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS_SCRIPT';
package App::cpanminus::script;use strict;use Config;use Cwd ();use App::cpanminus;use App::cpanminus::Dependency;use File::Basename ();use File::Find ();use File::Path ();use File::Spec ();use File::Copy ();use File::Temp ();use Getopt::Long ();...
It appears your cpanm executable was installed via `perlbrew install-cpanm`.
cpanm --self-upgrade won't upgrade the version of cpanm you're running.
Run the following command to get it upgraded.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/remarkpl/public/remark.min.js view on Meta::CPAN
beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.TITLE_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),...
},a={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},r={className:"symbol",variants:[{begin:/\=[lgenxc]=/},{begin:/\$/}]},s={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[e.BACKSL...
},{begin:":\\s*"+t}]}]}}},{name:"hsp",create:function(e){return{case_insensitive:!0,lexemes:/[\w\._]+/,keywords:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mca...
},contains:[t,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[t,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"function",begin:"\\bend\\s+",e...
contains:[{className:"comment",begin:/\(\*/,end:/\*\)/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{begin:/\{/,end:/\}/,illegal:/:/}]}}},{name:"matlab",create:function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'",end:"'",contai...
illegal:"</",contains:[e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_M...
contains:[i]});return{aliases:["ps"],lexemes:/-?[A-z\.\-]+/,case_insensitive:!0,keywords:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try...
},{className:"meta",begin:"#\\!?\\[",end:"\\]",contains:[{className:"meta-string",begin:/"/,end:/"/}]},{className:"class",beginKeywords:"type",end:";",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"\\S"},{className:"class",beg...
literal:"true false nil"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.NUMBER_MODE,a,t.preprocessor],illegal:/#/}}},{name:"sql",create:function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*#]/,contains:[{beginKey...
return{aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+o.join("|")+")",contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+i,returnBegin:!0,cont...
built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx...
view all matches for this distribution
view release on metacpan or search on metacpan
share/revealjs/plugin/highlight/highlight.esm.js view on Meta::CPAN
function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(...
/*!
* reveal.js plugin that adds syntax highlight support.
*/
var of={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:rf,init:function(e){var t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,t....
view all matches for this distribution
view release on metacpan or search on metacpan
*{$f x 2} = sub () { ['bold', $c] };
}
}
sub set {
my ($f, $m) = @_;
# chown should be called before chmod to prevent setuid, setgid bit gets reset.
chown @$m{qw/uid gid/}, $f and chmod $m->{mode} & 07777, $f and utimensat($f, $m->{mtime}) or die "$f: $!";
}
sub equiv {
my ($p, $q) = @_;
no warnings 'uninitialized';
all { $p->{$_} eq $q->{$_} } qw/mode uid gid size mtime hl sl/;
}
} else {
# That's really nasty...
symlink my $g = $q->{sl}, $f or die "unable to symlink $f to $q->{sl}: $!.";
# symlink(7) explicitly says the permission of a symbolic link can't be changed(on Linux).
lchown($f, @$q{qw/uid gid/}) and utimensat($f, $q->{mtime}) or die "$f: $!";
}
# A new hash is required here and above since metadata varies for non-directory.
my $p = $db->{$_} = {%$q,
owner => $db->{$_}{owner}};
$p->{owner}{current} = $cp->{oid}, $p->{owner}{record}{$cp->{oid}} = $cp->{ts};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/sh2p/Builtins.pm view on Meta::CPAN
return $ntok;
}
########################################################
sub do_chown {
my ($cmd) = shift;
my ($opt) = shift;
my $ugrp;
my $ntok = 1;
lib/App/sh2p/Builtins.pm view on Meta::CPAN
my $comment = '';
my $text = '';
if (defined $ugrp) {
$ntok++;
if ($cmd eq 'chown') {
iout "{my(\$uid,\$gid)=(getpwnam(\"$ugrp\"))[2,3];";
}
else { # chgrp
iout "{my (\$name,undef,\$gid)=getgrname(\"$ugrp\");\n";
out " my \$uid=(getpwnam(\$name))[2];\n ";
}
out "chown \$uid, \$gid,"; # There is no chgrp
}
else {
error_out ("No user/group supplied for $cmd");
iout $cmd;
}
lib/App/sh2p/Builtins.pm view on Meta::CPAN
sub do_continue
sub do_cd
sub chmod_text_permissions
sub do_chmod
# also used by umask
sub do_chown
sub do_exec
sub do_exit
sub do_export
sub do_expr
sub do_functions
view all matches for this distribution
view release on metacpan or search on metacpan
- \P{PROP} means literal P{PROP}
- \X means literal X
- support POSIX-style character classes
- modifier /a /d /l /u, and /aa of regexp makes die
- use 5.12.0; --> use 5.12.0; no strict qw(refs);
- remove test 201_kanji.t,202_kanji.t,203_kanji.t,204_kanji.t,205_glob.t,210_chmod.t,211_chown.t,212_dbmopen.t,214_glob.t,216_open.t,217_qx.t,218_rename.t,221_sysopen.t,222_system.t,223_truncate.t,225_utime.t,226_chdir.t,227_chmod.t,228_chown.t,229...
- created by INABA Hitoshi
0.75 2011-06-05 00:00:00
- remove Esjis::binmode and Esjis::open (it's a bad idea)
- created by INABA Hitoshi
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Ar/Libarchive.pm view on Meta::CPAN
my($self, $filename, $mode) = @_;
$self->_chmod($filename, $mode + 0 eq $mode ? $mode : oct($mode));
}
sub chown
{
my($self, $filename, $uid, $gid) = @_;
$self->_chown($filename, $uid, $gid);
}
sub remove
{
lib/Archive/Ar/Libarchive.pm view on Meta::CPAN
If false, removes setuid bits and applies the user's umask. Default
is true.
In L<Archive::Ar> this option is true for root only.
=item chown
Change the owners of extracted files, if possible. Default is true.
=item type
lib/Archive/Ar/Libarchive.pm view on Meta::CPAN
$ar->chmod($filename, $mode);
Change the permission mode of the member to C<$mode>.
=head2 chown
$ar->chown($filename, $uid, $gid);
$ar->chown($filename, $uid);
Change the ownership of the member to user id C<$udi> and (optionally)
group id C<$gid>. Negative id values are ignored.
=head2 remove
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Ar/Ng.pm view on Meta::CPAN
my $file = shift;
my $opts = shift || 0;
my $self = bless {}, $class;
my $defopts = {
chmod => 1,
chown => 1,
same_perms => ( $> == 0 ) ? 1 : 0,
symbols => undef,
};
$opts = {warn => $opts} unless ref $opts;
$self->clear();
lib/Archive/Ar/Ng.pm view on Meta::CPAN
syswrite( $fh, $rbuf, $blk_size ) or return $self->_error( "$filename: $!" );
}
undef $rbuf;
##--
close $fh or return $self->_error( "$filename: $!" );
if ( CAN_CHOWN && $self->{opts}->{chown} ) {
chown $meta->{fuid}, $meta->{fgid}, $filename or return $self->_error( "$filename: $!" );
}
if ( $self->{opts}->{chmod} ) {
my $mode = $meta->{mode};
unless ( $self->{opts}->{same_perms} ) {
$mode &= ~( oct( 7000 ) | ( umask | 0 ) );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Ar.pm view on Meta::CPAN
my $file = shift;
my $opts = shift || 0;
my $self = bless {}, $class;
my $defopts = {
chmod => 1,
chown => 1,
same_perms => ($> == 0) ? 1:0,
symbols => undef,
};
$opts = {warn => $opts} unless ref $opts;
lib/Archive/Ar.pm view on Meta::CPAN
return $self->_error("$filename: not in archive") unless $meta;
open my $fh, '>', $target or return $self->_error("$target: $!");
binmode $fh;
syswrite $fh, $meta->{data} or return $self->_error("$filename: $!");
close $fh or return $self->_error("$filename: $!");
if (CAN_CHOWN && $self->{opts}->{chown}) {
chown $meta->{uid}, $meta->{gid}, $filename or
return $self->_error("$filename: $!");
}
if ($self->{opts}->{chmod}) {
my $mode = $meta->{mode};
unless ($self->{opts}->{same_perms}) {
lib/Archive/Ar.pm view on Meta::CPAN
$self->{files}->{$filename}->{mode} =
$mode + 0 eq $mode ? $mode : oct($mode);
return 1;
}
sub chown {
my $self = shift;
my $filename = shift;
my $uid = shift;
my $gid = shift;
lib/Archive/Ar.pm view on Meta::CPAN
$ar->add_files('./bar.tar.gz', 'bat.pl')
$ar->add_data('newfile.txt','Some contents');
$ar->chmod('file1', 0644);
$ar->chown('file1', $uid, $gid);
$ar->remove('file1', 'file2');
my $filehash = $ar->get_content('bar.tar.gz');
my $data = $ar->get_data('bar.tar.gz');
lib/Archive/Ar.pm view on Meta::CPAN
When setting file permissions, use the values in the archive unchanged.
If false, removes setuid bits and applies the user's umask. Default is
true for the root user, false otherwise.
=item * chown
Change the owners of extracted files, if possible. Default is true.
=item * type
lib/Archive/Ar.pm view on Meta::CPAN
$ar->chmod($filename, $mode);
Change the mode of the member to C<$mode>.
=head2 chown
$ar->chown($filename, $uid, $gid);
$ar->chown($filename, $uid);
Change the ownership of the member to user id C<$uid> and (optionally)
group id C<$gid>. Negative id values are ignored.
=head2 remove
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Extract.pm view on Meta::CPAN
### is a potential security hole. -autrijus
### have to do it here, since A::T needs to be /loaded/ first ###
{ no strict 'refs'; local $^W;
### older versions of archive::tar <= 0.23
*Archive::Tar::chown = sub {};
}
{ local $^W; # quell 'splice() offset past end of array' warnings
# on older versions of A::T
view all matches for this distribution
view release on metacpan or search on metacpan
xs/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
xs/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
view release on metacpan or search on metacpan
lib/Archive/Tar/Wrapper/IPC/Cmd.pm view on Meta::CPAN
copy $path_or_stringref, $target or
LOGDIE "Can't copy $path_or_stringref to $target ($!)";
}
if(defined $uid) {
chown $uid, -1, $target or
LOGDIE "Can't chown $target uid to $uid ($!)";
}
if(defined $gid) {
chown -1, $gid, $target or
LOGDIE "Can't chown $target gid to $gid ($!)";
}
if(defined $perm) {
chmod $perm, $target or
LOGDIE "Can't chmod $target to $perm ($!)";
lib/Archive/Tar/Wrapper/IPC/Cmd.pm view on Meta::CPAN
######################################
sub perm_set {
######################################
my($filename, $perms) = @_;
chown($perms->[1], $perms->[2], $filename) or
LOGDIE "Cannot chown $filename ($!)";
chmod($perms->[0] & 07777, $filename) or
LOGDIE "Cannot chmod $filename ($!)";
}
###########################################
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Tar/Wrapper.pm view on Meta::CPAN
copy $path_or_stringref, $target
or LOGDIE "Can't copy $path_or_stringref to $target ($!)";
}
if ( defined $uid ) {
chown $uid, -1, $target
or LOGDIE "Can't chown $target uid to $uid ($!)";
}
if ( defined $gid ) {
chown -1, $gid, $target
or LOGDIE "Can't chown $target gid to $gid ($!)";
}
if ( defined $perm ) {
chmod $perm, $target
or LOGDIE "Can't chmod $target to $perm ($!)";
lib/Archive/Tar/Wrapper.pm view on Meta::CPAN
return \@stats;
}
sub perm_set {
my ( $filename, $perms ) = @_;
chown( $perms->[1], $perms->[2], $filename );
chmod( $perms->[0] & oct(777), $filename )
or LOGDIE "Cannot chmod $filename ($!)";
return 1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Tar.pm view on Meta::CPAN
$tar->add_files('file/foo.pl', 'docs/README');
$tar->add_data('file/baz.txt', 'This is the contents now');
$tar->rename('oldname', 'new/file/name');
$tar->chown('/', 'root');
$tar->chown('/', 'root:root');
$tar->chmod('/tmp', '1777');
$tar->write('files.tar'); # plain tar
$tar->write('files.tgz', COMPRESS_GZIP); # gzip compressed
$tar->write('files.tbz', COMPRESS_BZIP); # bzip2 compressed
lib/Archive/Tar.pm view on Meta::CPAN
my $fp = $entry->full_path;
$self->_error(qq[Could not create directory '$dir' for '$fp': $@]);
return;
}
### XXX chown here? that might not be the same as in the archive
### as we're only chown'ing to the owner of the file we're extracting
### not to the owner of the directory itself, which may or may not
### be another entry in the archive
### Answer: no, gnu tar doesn't do it either, it'd be the wrong
### way to go.
#if( $CHOWN && CAN_CHOWN ) {
# chown $entry->uid, $entry->gid, $dir or
# $self->_error( qq[Could not set uid/gid on '$dir'] );
#}
}
### we're done if we just needed to create a dir ###
lib/Archive/Tar.pm view on Meta::CPAN
utime time, $entry->mtime - TIME_OFFSET, $full or
$self->_error( qq[Could not update timestamp] );
}
if( $CHOWN && CAN_CHOWN->() and not -l $full and not ( $entry->is_hardlink and ON_UNIX and $EXTRACT_HARDLINK ) ) {
CORE::chown( $entry->uid, $entry->gid, $full ) or
$self->_error( qq[Could not set uid/gid on '$full'] );
}
### only chmod if we're allowed to, but never chmod symlinks, since they'll
### change the perms on the file they're linking too...
lib/Archive/Tar.pm view on Meta::CPAN
my $mode = $entry->mode;
unless ($SAME_PERMISSIONS) {
$mode &= ~(oct(7000) | umask);
}
CORE::chmod( $mode, $full ) or
$self->_error( qq[Could not chown '$full' to ] . $entry->mode );
}
return 1;
}
lib/Archive/Tar.pm view on Meta::CPAN
my $entry = $self->_find_entry( $file ) or return;
my $x = $entry->chmod( @args );
return $x;
}
=head2 $tar->chown( $file, $uname [, $gname] )
Change owner $file to $uname and $gname.
Returns true on success and false on failure.
=cut
sub chown {
my $self = shift;
my $file = shift; return unless defined $file;
my $uname = shift; return unless defined $uname;
my @args = ($uname);
push(@args, shift);
my $entry = $self->_find_entry( $file ) or return;
my $x = $entry->chown( @args );
return $x;
}
=head2 $tar->remove (@filenamelist)
lib/Archive/Tar.pm view on Meta::CPAN
This works just like C</bin/tar>'s C<-h> option.
=head2 $Archive::Tar::CHOWN
By default, C<Archive::Tar> will try to C<chown> your files if it is
able to. In some cases, this may not be desired. In that case, set
this variable to C<0> to disable C<chown>-ing, even if it were
possible.
The default is C<1>.
=head2 $Archive::Tar::CHMOD
view all matches for this distribution
view release on metacpan or search on metacpan
unzip-6.0/History.600 view on Meta::CPAN
- AOS/VS, Atari, AtheOS, BeOS, UNIX (and unzpriv.h, fileio.c): modified the
symlink code to use the opened outfile handle for re-reading the symlink
target data; modified open_outfile to allow read access on outfile handle
(security fix against "ToCToU" vulnerability) [Chr. Spieler]
- UNIX (unix.c, Makefile, configure): fixed "ToCToU" security vulnerability
in close_outfile by using fchown() & fchmod() instead of chown() & chmod()
(only when available); added check for function existence to configure
[Dan Yefimov, Matthias Scheler, Chr. Spieler]
- fileio.c - open_outfile(): deny access for group&world to currently open
outfile on all systems that support umask() (AOS/VS, Atari, AtheOS, BeOS,
QDOS, Tandem, UNIX) [Chr. Spieler]
unzip-6.0/History.600 view on Meta::CPAN
specific compiler used). [Steven M. Schweda]
- unzip.c: replaced tab characters in output messages by appropiate number of
spaces (assuming standard tab spacing of 8 chars), to prevent mis-formatted
output on terminals with non-standard tabstop settings. [S. M. Schweda]
- unix/unix.c
* set_symlnk_attribs(): fixed uid/gid size check before calling lchown();
* set_direc_attribs(): repared wrongly inserted patch and fixed uid/gid
size check before calling chown(). [Chr. Spieler]
- vms/vms.c: fixed user-query code for existing files on VMS when extracting
in "-V" mode (retaining version numbers); fixed some problems with exotic
extended ODS5 file names, and files named ".". [Steven M. Schweda]
- vms/cmdline.c, vms/unz_cli.cld: extended CLI to support the new extended
meaning of the -o flag (-oo => "overwrite ALL existing" when retaining
view all matches for this distribution
view release on metacpan or search on metacpan
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
PERL_LANGINFO_H|5.027004||Viu
PERL_LAST_5_18_0_INTERP_MEMBER|5.017009||Viu
Perl_ldexp|5.021003|5.021003|n
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
view release on metacpan or search on metacpan
install_arepa.pl view on Meta::CPAN
"conf"),
$config->get_key("upload_queue:path"),
$config->get_key("dir:build_logs")) {
print "Creating directory $path\n";
mkpath($path);
chown($uid, $gid, $path);
symchmod("g+w", $path);
}
my $builder_dir = "/etc/arepa/builders";
print "Creating builder configuration directory $builder_dir\n";
mkpath($builder_dir);
chown($uid, $gid, $builder_dir);
symchmod("g+w", $builder_dir);
print "Creating package DB in $package_db_path\n";
my $package_db = Arepa::PackageDb->new($package_db_path);
chown($uid, $gid, $package_db_path);
symchmod("g+w", $package_db_path);
my $db_dir = dirname($package_db_path);
print "Fixing permissions for database directory $db_dir\n";
chown($uid, $gid, $db_dir);
symchmod("g+w", $db_dir);
my $session_db_path = $config->get_key("web_ui:session_db");
if (! -r $session_db_path) {
print "Creating web UI session DB in $session_db_path\n";
install_arepa.pl view on Meta::CPAN
my $sqlite_cmd = <<EOC;
echo "CREATE TABLE session (sid VARCHAR(40) PRIMARY KEY, data TEXT, expires INTEGER UNSIGNED NOT NULL, UNIQUE(sid));" | sqlite3 '$session_db_path'
EOC
print "Creating session DB schema with:\n$sqlite_cmd";
system($sqlite_cmd);
chown($web_uid, $web_gid, $session_db_path);
symchmod("g+w", $session_db_path);
}
my $repo_dists_conf = File::Spec->catfile($config->get_key("repository:path"),
"conf",
"distributions");
print "Creating repo configuration file in $repo_dists_conf\n";
open F, ">>$repo_dists_conf";
close F;
chown($uid, $gid, $repo_dists_conf);
symchmod("g+w", $repo_dists_conf);
my $gpg_dir = $config->get_key("web_ui:gpg_homedir");
print "Creating GPG directory in $gpg_dir\n";
mkpath($gpg_dir);
chown($web_uid, $web_gid, $gpg_dir);
chmod(0700, $gpg_dir);
my $gpg_options = File::Spec->catfile($config->get_key("web_ui:gpg_homedir"),
"options");
if (! -f $gpg_options) {
print "Creating options file $gpg_options\n";
my $keyrings_dir =
File::Spec->catfile(dirname($config->get_key("web_ui:gpg_homedir")),
"keyrings");
mkpath($keyrings_dir);
chown($uid, $gid, $keyrings_dir);
symchmod("g+w", $keyrings_dir);
open F, ">$gpg_options";
print F "keyring $keyrings_dir/uploaders.gpg\n";
close F;
chown($uid, $gid, $gpg_options);
symchmod("g+w", $gpg_options);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ArrayData/Lingua/Word/EN/Medical/Glutanimate.pm view on Meta::CPAN
Prochlorophyta
prochlorpemazine
Prochlorperazine
prochondral
prochordal
Prochownick
prochromosome
prochronism
prochymosin
procidentia
procinonide
view all matches for this distribution
view release on metacpan or search on metacpan
libnova-0.15.0/install-sh view on Meta::CPAN
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
libnova-0.15.0/install-sh view on Meta::CPAN
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
libnova-0.15.0/install-sh view on Meta::CPAN
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
libnova-0.15.0/install-sh view on Meta::CPAN
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
libnova-0.15.0/install-sh view on Meta::CPAN
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
libnova-0.15.0/install-sh view on Meta::CPAN
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astroboy.pod view on Meta::CPAN
Do this, as root:
ln -s /usr/share/music /home/joe/music
ln -s /usr/share/music /home/jane/music
ln -s /usr/share/music /root/music
chown joe.joe /home/joe/music
chown jane.jane /home/jane/music
That is an example of what you would do.
=head1 USING ASTROBOY
view all matches for this distribution