view release on metacpan or search on metacpan
lib/App/Sysadmin/Log/Simple.pm view on Meta::CPAN
=over 4
=item * SUDO_USER or USER can be spoofed
=item * The files can be edited at any time, they are chmod 644 and
owned by an unprivileged user
=item * The timestamp depends on the system clock
=item * ...etc
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/File/Remove.pm view on Meta::CPAN
unless ( -w $path ) {
# Make the file writable (implementation from File::Path)
(undef, undef, my $rp) = lstat $path or next;
$rp &= 07777; # Don't forget setuid, setgid, sticky bits
$rp |= 0600; # Turn on user read/write
chmod $rp, $path;
}
if ( $unlink ? $unlink->($path) : unlink($path) ) {
# Failed to delete the file
next if -e $path;
push @removes, $path;
local/lib/perl5/File/Remove.pm view on Meta::CPAN
push @removes, $path;
}
} else {
my ($save_mode) = (stat $dir)[2];
chmod $save_mode & 0777, $dir; # just in case we cannot remove it.
if ( $rmdir ? $rmdir->($dir) : rmdir($dir) ) {
# Failed to delete the directory
next if -e $path;
push @removes, $path;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TeleGramma/Config.pm view on Meta::CPAN
sub create_default_config {
my $self = shift;
my $path = $self->path_config;
Config::INI::Writer->write_file($self->default_config, $path);
chmod 0600, $path;
}
sub config_created_message {
my $self = shift;
my $path = $self->path_config;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/build-templer view on Meta::CPAN
`pl2bat templer`; # Will wrap templer in a batch file named templer.bat.
}
else
{
chmod( 0755, "templer" );
}
#
# All done.
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TestOnTap/PackInfo.pm view on Meta::CPAN
if (!$IS_WINDOWS)
{
my $mode = (stat($scriptFile))[2];
$mode |= 0100;
chmod($mode, $scriptFile);
}
return $scriptFile;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-dailyreport.t view on Meta::CPAN
SKIP: {
skip "Running on Windows", 2 if $^O eq 'MSWin32';
my ($fh, $filename) = tempfile(UNLINK => 1);
chmod 0220, $filename;
dies_ok (sub {App::TimeClock::Daily::Report->new($filename, $printer)}, "Timelog not readable");
chmod 0664, $filename;
{
my $report = App::TimeClock::Daily::Report->new($filename, $printer);
unlink $filename;
dies_ok (sub {$report->execute()}, "Timelog deleted");
view all matches for this distribution
view release on metacpan or search on metacpan
bin/todo.pl view on Meta::CPAN
return unless -e $CONFFILE;
my @stat = stat($CONFFILE);
my $mode = $stat[2];
if($mode & S_IRGRP || $mode & S_IROTH) {
warn("Config file $CONFFILE is readable by someone other than you, fixing.");
chmod 0600, $CONFFILE;
}
}
sub load_config {
return unless(-e $CONFFILE);
bin/todo.pl view on Meta::CPAN
save_config();
}
sub save_config {
DumpFile($CONFFILE, \%config);
chmod 0600, $CONFFILE;
}
sub version {
print "This is hiveminder.com's todo.pl version $VERSION\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Transpierce.pm view on Meta::CPAN
=item * C<restore.sh> will remove these files altogether (but not the directories)
=item * C<diff.sh> will C<ls -l> these files
=item * three words used after C<new> will be used for C<chmod>, C<chown> and C<chgrp> respectively and are required
=item * file permissions must be octal number in form of C<0NNN> (cannot be C<+x> for example)
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Tweet.pm view on Meta::CPAN
my $cipher = Crypt::CBC->new( -key => $cipher_key, -cipher => 'Blowfish' );
if ( not -e $config_file ) {
DEBUG "creating config file [$config_file]";
touch $config_file if not -e $config_file;
chmod oct(600), $config_file;
}
my $config = Config::YAML->new( config => $config_file, );
$config->{username} = $args->{username} if exists $args->{username};
lib/App/Tweet.pm view on Meta::CPAN
my $cipher_key = String::Random->new()->randpattern( '.' x 56 );
DEBUG "created new cipher key [$cipher_key]";
write_file( $cipher_file, $cipher_key );
chmod oct(600), $cipher_file;
return $cipher_key;
}
DEBUG "reading cipher file [$cipher_file]";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Twitch.pm view on Meta::CPAN
);
$self->_max_feeds_count;
my $running_config_dumpfile = $self->tmpdir.'/'.$self->configfile;
$running_config_dumpfile =~ s/\.yml/\.running_config\.yml/;
DumpFile($running_config_dumpfile,$self->running_config);
chmod 0600, $running_config_dumpfile;
$self->yield('add_feed');
}
event add_feed => sub {
my ( $self, $kernel ) = @_[ OBJECT, KERNEL ];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Unliner.pm view on Meta::CPAN
sort | uniq -c | sort -rn
}
Now make C<reportgen> executable:
$ chmod a+x reportgen
Now you can run C<reportgen> like a normal program:
$ ./reportgen /var/www/log/access.log
43628 200
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/VW/Install.pm view on Meta::CPAN
my $src = module_dir('App::VW') . "/etc/init.d/vw-ubuntu";
my $dst = "/etc/init.d/vw";
$self->verbose("Copying $src to $dst .\n");
copy($src, $dst) || die "Can't copy file to $dst: $!";
$self->verbose("Making $dst executable.\n");
chmod(0755, $dst) || die "Can't make $dst executable: $!";
$self->verbose("Creating /etc/vw .\n");
if (! -d "/etc/vw" ) {
mkdir "/etc/vw" || die "Can't create /etc/vw: $!";
}
print $self->post_installation_message;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Virtualenv.pm view on Meta::CPAN
my $pkg_path = dirname(__FILE__);
say "Copying... bin/activate";
copy("$pkg_path/Virtualenv/activate", "$virtualenv_path/bin/activate");
chmod(0644, "$virtualenv_path/bin/activate");
say "Copying... bin/sh.pl";
copy("$pkg_path/Virtualenv/sh.pl", "$virtualenv_path/bin/sh.pl");
chmod(0755, "$virtualenv_path/bin/sh.pl");
say "Copying... bin/perl.pl";
file_put_contents("$virtualenv_path/bin/perl.pl", "#!".shellmeta($Config{perlpath})."\n".file_get_contents("$pkg_path/Virtualenv/perl.pl"));
chmod(0755, "$virtualenv_path/bin/perl.pl");
symlink("perl.pl", "$virtualenv_path/bin/perl");
say "Copying... bin/virtualenv.pl";
copy("$pkg_path/Virtualenv/virtualenv.pl", "$virtualenv_path/bin/virtualenv.pl");
chmod(0755, "$virtualenv_path/bin/virtualenv.pl");
symlink("virtualenv.pl", "$virtualenv_path/bin/virtualenv");
return $virtualenv_path;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Wax.pm view on Meta::CPAN
}
# remove temporary files
method _unlink ($unlink) {
for my $filename (@$unlink) {
chmod 0600, $filename; # borrowed from File::Temp (may be needed on Windows)
$self->debug('removing: %s', $filename);
unlink($filename) || $self->log(WARN => "Can't unlink %s: %s", $filename, $!);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
You may also choose to download wp-tools as a single executable, like
this:
curl -OL https://raw.githubusercontent.com/bluehost/wp-tools/solo/wp-tools
chmod +x wp-tools
This executable includes all the non-core Perl module dependencies
built-in.
For developers
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/XUL.pm view on Meta::CPAN
$tmpdir->base().'/'.$name.'/perl/modules/App/XUL/XML.pm');
fcopy($utilspath.'/../lib/App/XUL/Object.pm',
$tmpdir->base().'/'.$name.'/perl/modules/App/XUL/Object.pm');
# chmod certain files
chmod(0755, $tmpdir->base().'/'.$name.'/start_macosx.pl');
chmod(0755, $tmpdir->base().'/'.$name.'/start_win.pl');
chmod(0755, $tmpdir->base().'/'.$name.'/start_linux.pl');
# move tmpdir to final destination
rename($tmpdir->base().'/'.$name, $path);
}
lib/App/XUL.pm view on Meta::CPAN
$tmpdir->base().'/'.$name.'.app/Contents/Resources/perl/modules/App/XUL/XML.pm');
fcopy($utilspath.'/../lib/App/XUL/Object.pm',
$tmpdir->base().'/'.$name.'.app/Contents/Resources/perl/modules/App/XUL/Object.pm');
# chmod certain files
chmod(0755, $tmpdir->base().'/'.$name.'.app/Contents/MacOS/start.pl');
# move tmpdir to final destination
rename($tmpdir->base().'/'.$name.'.app', $path);
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
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 $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
lib/App/ZFSCurses/Text.pm view on Meta::CPAN
usedbyrefreservation%The amount of space used by a refreservation set on this dataset, which would be freed if the refreservation was removed.
userrefs%This property is set to the number of user holds on this snapshot. User holds are set by using the "zfs hold" command.
volblocksize%For volumes, specifies the block size of the volume. The blocksize cannot be changed once the volume has been written, so it should be set at volume creation time. The default blocksize for volumes is 8 Kbytes. Any power of 2 from 512 by...
written%The amount of referenced space written to this dataset since the previous snapshot.
aclinherit%Controls how ACL entries are inherited when files and directories are created. A file system with an aclinherit property of discard does not inherit any ACL entries. A file system with an aclinherit property value of noallow only inherits ...
aclmode%Controls how an ACL is modified during chmod(2). A file system with an aclmode property of discard (the default) deletes all ACL entries that do not represent the mode of the file. An aclmode property of groupmask reduces permissions granted ...
atime%Controls whether the access time for files is updated when they are read. Turning this property off avoids producing write traffic when reading files and can result in significant performance gains, though it might confuse mailers and other sim...
canmount%If this property is set to off, the file system cannot be mounted, and is ignored by "zfs mount -a". Setting this property to off is similar to setting the mountpoint property to none, except that the dataset still has a normal mountpoint pr...
checksum%Controls the checksum used to verify data integrity. The default value is on, which automatically selects an appropriate algorithm (currently, fletcher4, but this may change in future releases). The value off disables integrity checking on u...
compression%Controls the compression algorithm used for this dataset. Setting compression to on indicates that the current default compression algorithm should be used. The default balances compression and decompression speed, with compression ratio ...
copies%Controls the number of copies of data stored for this dataset. These copies are in addition to any redundancy provided by the pool, for example, mirroring or RAID-Z. The copies are stored on different disks, if possible. The space used by mult...
view all matches for this distribution
view release on metacpan or search on metacpan
script/_chinese-zodiac-of view on Meta::CPAN
# return [$type, $clsets] unless $err;
# die "Can't check whether $type is a builtin Sah type: $err"
# unless $err =~ /\ACan't locate/;
#
# # not a type, try a schema under Sah::Schema
# my $schmod = "Sah::Schema::$type";
# (my $schmod_pm = "$schmod.pm") =~ s!::!/!g;
# eval { require $schmod_pm; 1 };
# die "Not a known built-in Sah type '$type' (can't locate ".
# "Data::Sah::Type::$type) and not a known schema name '$type' ($@)"
# if $@;
# no strict 'refs';
# my $sch2 = ${"$schmod\::schema"};
# die "BUG: Schema module $schmod doesn't contain \$schema" unless $sch2;
# unshift @$clsets, $sch2->[1];
# _resolve($opts, $sch2->[0], $clsets, $seen);
#}
#
#sub resolve_schema {
view all matches for this distribution
view release on metacpan or search on metacpan
bin/zofcms_helper view on Meta::CPAN
open my $fh, '>', $opts{index}
or die "Failed to open/create $opts{index} [$!]";
print $fh make_index_pl( $opts{core} );
close $fh;
chmod 0755, $opts{index};
open $fh, '>', $opts{base}
or die "Failed to open/create $opts{base} [$!]";
print $fh make_base();
view all matches for this distribution
view release on metacpan or search on metacpan
*d = toUPPER(*d);
else if (strEQ(d,"crypt"))
*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':
view all matches for this distribution
view release on metacpan or search on metacpan
t/multi_files.t view on Meta::CPAN
is( $trap->die, undef, 'no death output' );
is( $result, 1, 'got correct return value' );
my $file1_last_backup_file = App::bk::get_last_backup( $Bin, 'file1.txt' );
note( 'Amending file ', $file1_last_backup_file );
chmod 0644, $file1_last_backup_file || BAIL_OUT("Could not reset perms on $file1_last_backup_file:: ". $!);
open(my $fh, '>>', $file1_last_backup_file) || BAIL_OUT("Could not open $file1_last_backup_file: ". $!);
print $fh ' Amended test',$/ || BAIL_OUT("Could not write to $file1_last_backup_file: ", $!);
close($fh) || BAIL_OUT("Could not close $file1_last_backup_file: ". $!);
my $file2_last_backup_file = App::bk::get_last_backup( $Bin, 'file2.txt' );
note( 'Amending file ', $file2_last_backup_file );
chmod 0644, $file2_last_backup_file || BAIL_OUT("Could not reset perms on $file2_last_backup_file:: ". $!);
open($fh, '>>', $file2_last_backup_file) || BAIL_OUT("Could not open $file2_last_backup_file: ". $!);
print $fh ' Amended test',$/ || BAIL_OUT("Could not write to $file2_last_backup_file: ". $!);
close($fh) || BAIL_OUT("Could not close $file2_last_backup_file: ". $!);
$result = trap { App::bk::backup_files(); };
view all matches for this distribution
view release on metacpan or search on metacpan
bin/breakout view on Meta::CPAN
}
my $jaildir = tempdir(DIR => "/");
(my $jaildir_rel_root = $jaildir) =~ s/.//;
chmod 0755, $jaildir or die "chmod failed: $!";
chdir "/" or die "chdir to / failed: $!";
chroot $jaildir or die "chroot to jail failed: $!";
rmdir $jaildir_rel_root or warn "failed to clean $jaildir: $!";
my $ino = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
script/btcindo view on Meta::CPAN
First, create an account at L<https://bitcoin.co.id>, create the trade API key
then insert the API key and secret key in F<~/.config/btcindo.conf>. Since the
configuration file contains the API secret key, please make sure that the
permission of the file is set so that unauthorized users cannot read it (e.g.
chmod it to 0600).
# In ~/.config/btcindo.conf
key = ...
secret = ...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ccdiff.pm view on Meta::CPAN
$ git config --global difftool.ccdiff.cmd 'ccdiff --utf-8 -u -r $LOCAL $REMOTE'
$ git difftool SHA~..SHA
$ wget https://github.com/Tux/App-ccdiff/raw/master/Files/git-ccdiff \
-O ~/bin/git-ccdiff
$ perl -pi -e 's{/pro/bin/perl}{/usr/bin/env perl}' ~/bin/git-ccdiff
$ chmod 755 ~/bin/git-ccdiff
$ git ccdiff SHA
Of course you can use C<curl> instead of C<wget> and you can choose your own
(fixed) path to C<perl> instead of using C</usr/bin/env>.
view all matches for this distribution
view release on metacpan or search on metacpan
script/coinbasepro-lite view on Meta::CPAN
=head1 SYNOPSIS
First, create an account at Coinbase Pro. Create an API then insert the API information
in F<~/.config/coinbasepro-lite.conf>. Since the configuration file contains sensitive
information, please make sure that the permission of the file is set so that
unauthorized users cannot read it (e.g. chmod it to 0600).
# In ~/.config/coinbasepro-lite.conf
key = ...
secret = ...
passphrase = ...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanel.pm view on Meta::CPAN
$ cpanel uapi Notifications get_notifications_count
$ cpanel uapi ResourceUsage get_usages
$ cpanel uapi Fileman list_files dir=public_html
$ cpanel uapi Fileman get_file_content dir=public_html file=index.html
$ cpanel download public_html/index.html
$ cpanel api2 Fileman fileop op=chmod metadata=0755 sourcefiles=public_html/cgi-bin/hello-world
$ cpanel api2 Fileman fileop op=unlink sourcefiles=public_html/cgi-bin/hello-world
$ cpanel api2 Fileman mkdir path= name=new-dir-at-top
# this one is one at a time but can overwrite files
$ cpanel api2 Fileman savefile dir=public_html/cgi-bin filename=hello-world content="$(cat public_html/cgi-bin/hello-world)"
lib/App/cpanel.pm view on Meta::CPAN
=head3 write
Takes C<$dir>, C<$file>. Returns a promise of having written the file
contents.
=head3 chmod
Takes C<$path>, C<$perms>. Returns a promise of having changed the
permissions.
=head1 SEE ALSO
lib/App/cpanel.pm view on Meta::CPAN
my %localfs_map = (
ls => \&localfs_ls,
mkdir => \&localfs_mkdir,
read => \&localfs_read,
write => \&localfs_write,
chmod => \&localfs_chmod,
);
my %cpanel_map = (
ls => \&cpanel_ls,
mkdir => \&cpanel_mkdir,
read => \&cpanel_read,
write => \&cpanel_write,
chmod => \&cpanel_chmod,
);
our %MAP2HASH = (
localfs => \%localfs_map,
cpanel => \%cpanel_map,
);
lib/App/cpanel.pm view on Meta::CPAN
$from_map->{ls}->(path($from_dir)->dirname)
})->then(sub {
my ($dirs, $files) = @_;
$from_dir_perms = $dirs->{path($from_dir)->basename}[0] || '0755';
})->then(sub {
$to_map->{chmod}->($to_dir, $from_dir_perms)
})->then(sub {
$from_map->{ls}->($from_dir)
})->then(sub {
my ($dirs, $files) = @_;
my @dir_create_p = map
lib/App/cpanel.pm view on Meta::CPAN
sort keys %$dirs;
my @file_create_p = map {
my $this_file = $_;
$from_map->{read}->($from_dir, $this_file)
->then(sub { $to_map->{write}->($to_dir, $this_file, $_[0]) })
->then(sub { $to_map->{chmod}->("$to_dir/$this_file", $files->{$this_file}[0]) })
} sort keys %$files;
return Mojo::Promise->resolve(1) unless @dir_create_p + @file_create_p;
Mojo::Promise->all(@dir_create_p, @file_create_p);
});
}
lib/App/cpanel.pm view on Meta::CPAN
my $path = path($dir)->child($file);
$path->spurt($content);
Mojo::Promise->resolve(1);
}
sub localfs_chmod {
my ($path, $perms) = @_;
$path = path($path);
$path->chmod(oct $perms);
Mojo::Promise->resolve(1);
}
sub cpanel_ls {
my ($dir) = @_;
lib/App/cpanel.pm view on Meta::CPAN
api2_p qw(Fileman savefile), {
dir => $dir, filename => $file, content => $content,
};
}
sub cpanel_chmod {
my ($path, $perms) = @_;
api2_p qw(Fileman fileop), {
op => 'chmod', metadata => $perms, sourcefiles => $path,
};
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/build.cloudweights.log view on Meta::CPAN
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.88)
Checking if you have Test::More 0 ... Yes (1.001002)
Building and testing Sub-Identify-0.04
cp lib/Sub/Identify.pm blib/lib/Sub/Identify.pm
Running Mkbootstrap for Sub::Identify ()
chmod 644 Identify.bs
/Users/garu/perl5/perlbrew/perls/perl-5.19.9/bin/perl5.19.9 /Users/garu/perl5/perlbrew/perls/perl-5.19.9/lib/5.19.9/ExtUtils/xsubpp -typemap /Users/garu/perl5/perlbrew/perls/perl-5.19.9/lib/5.19.9/ExtUtils/typemap Identify.xs > Identify.xsc && mv I...
cc -c -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -O3 -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" "-I/Users/garu/perl5/perlbrew/perls/perl-5.19.9/lib/5.19.9/darwin-2level/CORE" Identify.c
rm -f blib/arch/auto/Sub/Identify/Identify.bundle
env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -fstack-protector Identify.o -o blib/arch/auto/Sub/Identify/Identify.bundle \
\
chmod 755 blib/arch/auto/Sub/Identify/Identify.bundle
/Users/garu/perl5/perlbrew/perls/perl-5.19.9/bin/perl5.19.9 -MExtUtils::Command::MM -e 'cp_nonempty' -- Identify.bs blib/arch/auto/Sub/Identify/Identify.bs 644
Manifying blib/man3/Sub::Identify.3
Running Mkbootstrap for Sub::Identify ()
chmod 644 Identify.bs
PERL_DL_NONLAZY=1 /Users/garu/perl5/perlbrew/perls/perl-5.19.9/bin/perl5.19.9 "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01basic.t ................ ok
t/02errors.t ............... ok
t/10pureperl-basic.t ....... ok
t/20attributes.t ........... ok
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanminus.pm view on Meta::CPAN
You can also copy the standalone executable to whatever location you'd like.
cd ~/bin
curl -L https://cpanmin.us/ -o cpanm
chmod +x cpanm
This just works, but be sure to grab the new version manually when you
upgrade because C<--self-upgrade> might not work with this installation setup.
=head2 Troubleshoot: HTTPS warnings
view all matches for this distribution