view release on metacpan or search on metacpan
FileManager.pm view on Meta::CPAN
Make sure the web server has read, write, and execute access access to the
directory you want to manage files in. Typically you are going to want to
run the following commands before you begin.
chown -R nobody /web/xyz/htdocs
chmod -R 755 /web/xyz/htdocs
The extract functionality only works with *.tar.gz and *.zip files.
=head1 RSYNC FEATURE
FileManager.pm view on Meta::CPAN
(will fail but will make known_hosts file)
- log out from user nobody back to root user
- dev_server> cd /usr/local/apache/nobody/.ssh
- dev_server> scp id_dsa.pub production_server:/usr/local/apache/nobody/.ssh/authorized_keys
- dev_server> chown -R nobody.nobody /usr/local/apache/nobody
- dev_server> chmod -R 700 /usr/local/apache/nobody
#7 log back into the production server
#8 become root
#9 Do the following commands:
- production_server> chown -R nobody.nobody /usr/local/apache/nobody
- production_server> chmod -R 700 /usr/local/apache/nobody
You also need to specify the production server in the development server's
web conf file. So your conf file should look like this:
<Location /FileManager>
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
);
sub MY::postamble {
q{
README: lib/Apache/GzipChain.pm Makefile
chmod +w $@
pod2text lib/Apache/GzipChain.pm > $@
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/HTTunnel/Keeper.pm view on Meta::CPAN
}
$slog->debug("HTTunnel Keeper: Apache User is '$apache_user' ($apache_uid)") ;
$slog->debug("HTTunnel Keeper: Apache Group is '$apache_group' ($apache_gid)") ;
chown($apache_uid, $apache_gid, $fifo) or die("Can't chown '$fifo': $!") ;
chmod(0600, $fifo) or die("Can't chmod '$fifo': $!") ;
}
# Now that everything is all set, we can fork and let the child do the work.
my $lifeline = new IO::Pipe() ;
view all matches for this distribution
view release on metacpan or search on metacpan
# --- MakeMaker tool_xsubpp section:
# --- MakeMaker tools_other section:
SHELL = /bin/sh
CHMOD = chmod
CP = cp
MV = mv
NOOP = $(TRUE)
NOECHO = @
RM_F = rm -f
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
# we have permission, use perl's native copy
copy( $file, $archive );
if ( -e $archive ) {
$log->audit("archive_file: $file backed up to $archive");
$self->chmod( file => $file, mode => $p{mode}, %args ) if $p{mode};
return $archive;
};
}
# we failed with existing permissions, try to escalate
$self->archive_file_sudo( $file ) if ( $p{sudo} && $< != 0 );
return $log->error( "backup of $file to $archive failed: $!", %args)
if ! -e $archive;
$self->chmod( file => $file, mode => $p{mode}, %args ) if $p{mode};
$log->audit("$file backed up to $archive");
return $archive;
}
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
}
$log->error( "archive_file: sudo or cp was missing, could not escalate.",fatal=>0);
return;
};
sub chmod {
my $self = shift;
my %p = validate(
@_,
{ 'file' => { type => SCALAR, optional => 1, },
'file_or_dir' => { type => SCALAR, optional => 1, },
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
my $mode = $p{mode};
my %args = $self->get_std_args( %p );
my $file = $p{file} || $p{file_or_dir} || $p{dir}
or return $log->error( "invalid params to chmod in ". ref $self );
if ( $p{sudo} ) {
my $chmod = $self->find_bin( 'chmod', debug => 0 );
my $sudo = $self->sudo();
$self->syscmd( "$sudo $chmod $mode $file", debug => 0 )
or return $log->error( "couldn't chmod $file: $!", %args );
}
# note the conversion of ($mode) to an octal value. Very important!
CORE::chmod( oct($mode), $file ) or
return $log->error( "couldn't chmod $file: $!", %args);
$log->audit("chmod $mode $file");
}
sub chown {
my $self = shift;
my $file = shift;
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
move( "$file.tmp", $file )
or return $log->error(" unable to update $file", %args);
# set file permissions mode if requested
$self->chmod( file => $file, mode => $p{mode}, %args )
or return if $p{mode};
return 1;
}
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
%args
)
if ( $uid && $gid ); # set file ownership on the new file
# set file permissions on the new file
$self->chmod(
file_or_dir => $existing,
mode => $mode,
sudo => $sudo,
%args
)
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
gid => $gid,
sudo => $sudo,
%args
) if ( $uid && $gid ); # set ownership on new existing file
$self->chmod(
file_or_dir => $existing,
mode => $mode,
sudo => $sudo,
%args
)
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
my %args = ( debug => $p{debug}, fatal => $p{fatal} );
-e $file or return $log->error( "$file does not exist.", %args);
-r $file or return $log->error( "$file is not readable by you ("
. getpwuid($>)
. "). You need to fix this, using chown or chmod.", %args);
return 1;
}
sub is_writable {
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
my $mkdir = $self->find_bin( 'mkdir', %args) or return;
# if we are root, just do it (no sudo nonsense)
if ( $< == 0 ) {
$self->syscmd( "$mkdir -p $dir", %args) or return;
$self->chmod( dir => $dir, mode => $mode, %args ) if $mode;
return 1 if -d $dir;
return $log->error( "failed to create $dir", %args);
}
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
$log->audit( "setting ownership to $<.");
my $chown = $self->find_bin( 'chown', %args);
$self->syscmd( "$sudo $chown $< $dir", %args);
$self->chmod( dir => $dir, mode => $mode, sudo => $sudo, %args)
if $mode;
return -d $dir ? 1 : 0;
}
$log->audit( "trying mkdir -p $dir" );
# no root and no sudo, just try and see what happens
$self->syscmd( "$mkdir -p $dir", %args ) or return;
$self->chmod( dir => $dir, mode => $mode, %args) if $mode;
return $log->audit( "mkdir_system created $dir" ) if -d $dir;
return $log->error( '', %args );
}
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
# Returns : the filename of the backup file, or 0 on failure.
# Parameters : S - file - the filname to be backed up
# Comments : none
=item chmod
Set the permissions (ugo-rwx) of a file. Will use the native perl methods (by default) but can also use system calls and prepend sudo if additional permissions are needed.
$util->chmod(
file_or_dir => '/etc/resolv.conf',
mode => '0755',
sudo => $sudo
)
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.old view on Meta::CPAN
# --- MakeMaker tools_other section:
SHELL = /bin/sh
CHMOD = chmod
CP = cp
LD = cc
MV = mv
NOOP = $(SHELL) -c true
RM_F = rm -f
Makefile.old view on Meta::CPAN
POD2MAN_EXE = /usr/bin/pod2man
POD2MAN = $(PERL) -we '%m=@ARGV;for (keys %m){' \
-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "Makefile";' \
-e 'print "Manifying $$m{$$_}\n";' \
-e 'system(q[$(PERLRUN) $(POD2MAN_EXE) ].qq[$$_>$$m{$$_}])==0 or warn "Couldn\047t install $$m{$$_}\n";' \
-e 'chmod(oct($(PERM_RW)), $$m{$$_}) or warn "chmod $(PERM_RW) $$m{$$_}: $$!\n";}'
manifypods : pure_all lib/Apache/MONITOR.pm
@$(POD2MAN) \
lib/Apache/MONITOR.pm \
$(INST_MAN3DIR)/Apache::MONITOR.$(MAN3EXT)
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.old view on Meta::CPAN
# --- MakeMaker tools_other section:
SHELL = /bin/sh
CHMOD = chmod
CP = cp
LD = gcc -B/usr/ccs/bin/
MV = mv
NOOP = $(SHELL) -c true
RM_F = rm -f
Makefile.old view on Meta::CPAN
POD2MAN_EXE = /usr/local/bin/pod2man
POD2MAN = $(PERL) -we '%m=@ARGV;for (keys %m){' \
-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "Makefile";' \
-e 'print "Manifying $$m{$$_}\n";' \
-e 'system(qq[$$^X ].q["-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" $(POD2MAN_EXE) ].qq[$$_>$$m{$$_}])==0 or warn "Couldn\047t install $$m{$$_}\n";' \
-e 'chmod(oct($(PERM_RW))), $$m{$$_} or warn "chmod $(PERM_RW) $$m{$$_}: $$!\n";}'
manifypods : pure_all OWA.pm
@$(POD2MAN) \
OWA.pm \
$(INST_MAN3DIR)/Apache::OWA.$(MAN3EXT)
view all matches for this distribution
view release on metacpan or search on metacpan
print STDERR "Error extracting '$file' from '$par': error code: $rv";
return undef;
}
if ($member->fileAttributeFormat == 3) { # unix permissions
my $perms = $member->unixFileAttributes & 0xFFF;
unless(chmod $perms, $file) {
print STDERR "chmod $perms, $file failed: $!";
return undef;
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
$dbh->do( $tables{$table} );
}
}
$dbh->disconnect;
chmod 0666 => "$pkit_root/dbfile";
unless ($root_found) {
push( @ARGV, '--documentroot' => $pkit_root );
chmod 0777 => catfile( $pkit_root, 'View', 'pkit_cache' );
}
Apache::TestRunPerl->new->run(@ARGV);
1;
view all matches for this distribution
view release on metacpan or search on metacpan
PrettyPerl.pm view on Meta::CPAN
our @KeyWords =
qw(
while until for foreach unless if elsif else do
package use no require import and or eq ne cmp
abs accept alarm atan2 bind binmode bless
caller chdir chmod chomp chop chown chr
chroot close closedir connect continue cos
crypt dbmclose dbmopen defined delete die
dump each endgrent endhostent endnetent
endprotoent endpwent endservent eof eval
exec exists exit exp fcntl fileno flock
view all matches for this distribution
view release on metacpan or search on metacpan
3. Install Apache/Recorder/recorder.pl in your cgi-bin
copy Apache/Recorder/recorder.pl to your cgi-bin, and make sure that it has executable rights:
cp recorder.pl /home/httpd/cgi-bin/
chmod +x /home/httpd/cgi-bin/recorder.pl
4. Record a session
Point your browser to http://www.your-domain.com/cgi-bin/recorder.pl.
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my %common_opts = (
VERSION => $VERSION,
PREREQ_PM => \%prereqs,
dist => {
COMPRESS => 'gzip -9f', SUFFIX => 'gz',
PREOP => 'find $(DISTVNAME) -type d -print|xargs chmod 0755 && ' .
'find $(DISTVNAME) -type f -print|xargs chmod 0644',
TO_UNIX => 'find $(DISTVNAME) -type f -print|xargs dos2unix'
},
clean => { FILES => 't/TEST' },
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Roaming.pm view on Meta::CPAN
server only. For example I do
mkdir /home/httpd/html/roaming
chown nobody /home/httpd/html/roaming
chgrp nobody /home/httpd/html/roaming
chmod 700 /home/httpd/html/roaming
with I<nobody> being the web server user.
Access to the roaming directory must be restricted and enabled via
password only. Finally tell the web server, that Apache::Roaming is
lib/Apache/Roaming.pm view on Meta::CPAN
web server and noone else, for example by doing a
mkdir /home/httpd/html/roaming
chown nobody /home/httpd/html/roaming
# Insert your web servers UID here
chmod 700 /home/httpd/html/roaming
=item 2.)
Start your communicator and open Preferences/Roaming User. Click the
"Enable Roaming Access for this profile" checkbox.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SWIT/Maker.pm view on Meta::CPAN
sub write_swit_app_pl {
my $self = shift;
$self->file_writer->write_scripts_swit_app_pl({
class => ref($self) });
chmod 0755, 'scripts/swit_app.pl';
}
sub install {
my ($self, $inst_dir) = @_;
my $si = Apache::SWIT::Maker::Config->instance->{skip_install} || [];
lib/Apache/SWIT/Maker.pm view on Meta::CPAN
}
sub dump_db {
push @INC, "t", "lib";
unlink("t/conf/schema.sql");
system("touch t/conf/schema.sql && chmod a+rw t/conf/schema.sql")
unless ($<);
conv_eval_use('T::TempDB');
system("pg_dump -c $ENV{APACHE_SWIT_DB_NAME} > t/conf/schema.sql");
}
lib/Apache/SWIT/Maker.pm view on Meta::CPAN
my $td = tempdir("/tmp/swit_test_root_XXXXXX");
my $cwd = abs_path(getcwd());
my $mfiles = maniread();
manicopy($mfiles, $td);
chdir $td;
system("chmod a+rwx `find . -type d`") and die;
system("chmod a+rw `find . -type f`") and die;
eval "use Test::TempDatabase";
my $dn = __FILE__;
for (; basename($dn) ne 'Apache'; $dn = dirname($dn))
{} # nothing
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SdnFw.pm view on Meta::CPAN
cd /root/src/postgresql-8.2.20/contrib/start-scripts/
cp linux /etc/rc.d/init.d/postgresql
# EDIT /etc/rc.d/init.d/postgresql and make it start at 80 instead of 98
# because it needs to start before apache
chkconfig --add postgresql
chmod +x /etc/rc.d/init.d/postgresql
su - postgres
cd /usr/local/pgsql/bin/
./initdb /usr/local/pgsql/data
exit
service postgresql start
view all matches for this distribution
view release on metacpan or search on metacpan
demo/Makefile view on Meta::CPAN
for c in $(SHORT); \
do install -m 0644 httpdconf/httpd.$$c.conf $(APACHECONF); \
done
mkdir -p $(PRIVATE)
echo $(SECRET) > $(SECFILE)
chmod -R go-rwX $(PRIVATE)
view all matches for this distribution
view release on metacpan or search on metacpan
rpm/Apache-Session-Browseable.spec view on Meta::CPAN
%{__perl_requires} $* |\
sed -e '/perl(Redis)/d'
EOF
%define __perl_requires %{_builddir}/%{real_name}-%{real_version}/%{name}-req
chmod +x %{__perl_requires}
%if 0%{?rhel} >= 7
%{?perl_default_filter}
%global __requires_exclude perl\\(Redis
%endif
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SharedMem.pm view on Meta::CPAN
=item *
C<ipc_mode> optional, octal
Setup manually the segment mode (see L<IPC::ShareLite>) for more details (default: 0600).
Warning: this value _must_ be octal, see chmod documentation in perlfunc manpage for more details.
=item *
C<ipc_segment_size> optional, integer
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my %common_opts = (
VERSION => $VERSION,
PREREQ_PM => \%prereqs,
dist => {
COMPRESS => 'gzip -9f', SUFFIX => 'gz',
PREOP => 'find $(DISTVNAME) -type d -print|xargs chmod 0755 && ' .
'find $(DISTVNAME) -type f -print|xargs chmod 0644',
TO_UNIX => 'find $(DISTVNAME) -type f -print|xargs dos2unix'
},
clean => { FILES => 't/TEST' },
);
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
);
sub MY::postamble {
q{
README: Stage.pm Makefile
chmod +w $@
pod2text Stage.pm > $@
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/TestConfig.pm view on Meta::CPAN
$self->genfile_warning($file, undef, $fh);
print $fh $content if $content;
close $fh;
chmod 0755, $file;
}
sub make_shebang {
# if perlpath is longer than 62 chars, some shells on certain
# platforms won't be able to run the shebang line, so when seeing
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.old view on Meta::CPAN
# --- MakeMaker tools_other section:
SHELL = /bin/sh
CHMOD = chmod
CP = cp
LD = cc
MV = mv
NOOP = $(SHELL) -c true
RM_F = rm -f
Makefile.old view on Meta::CPAN
POD2MAN_EXE = /usr/bin/pod2man
POD2MAN = $(PERL) -we '%m=@ARGV;for (keys %m){' \
-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "Makefile";' \
-e 'print "Manifying $$m{$$_}\n";' \
-e 'system(q[$(PERLRUN) $(POD2MAN_EXE) ].qq[$$_>$$m{$$_}])==0 or warn "Couldn\047t install $$m{$$_}\n";' \
-e 'chmod(oct($(PERM_RW)), $$m{$$_}) or warn "chmod $(PERM_RW) $$m{$$_}: $$!\n";}'
manifypods : pure_all lib/Apache/TopicMaps.pm
@$(POD2MAN) \
lib/Apache/TopicMaps.pm \
$(INST_MAN3DIR)/Apache::TopicMaps.$(MAN3EXT)
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
if (!rename("$dest.new", "$dest")) {
print STDERR "Cannot rename $dest.new to $dest: $!\n";
exit 10;
}
unlink "$dest.bak";
unless (chmod $perms, $dest) {
print STDERR "Cannot change permissions on $dest: $!\n";
}
1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Voodoo/Install.pm view on Meta::CPAN
$pretend || mkdir($dir,770) || $self->{ignore} || die "Can't create directory $dir: $!";
$self->debug(": created");
}
$self->info("- Making sure the $dir directory is writable by apache");
$pretend || chown($uid,$gid,$dir) || $self->{ignore} || die "Can't chown directory: $!";
$pretend || chmod(0770,$dir) || $self->{ignore} || die "Can't chmod directory: $!";
$self->debug(": ok");
}
}
sub make_writeable_files {
lib/Apache/Voodoo/Install.pm view on Meta::CPAN
$pretend || (system("touch $file") && ($self->{ignore} || die "Can't create file: $!"));
$self->debug(": created");
}
$self->info("- Making sure the $file directory is writable by apache");
$pretend || chown($uid,$gid,$file) || $self->{ignore} || die "Can't chown file: $!";
$pretend || chmod(0600,$file) || $self->{ignore} || die "Can't chmod file: $!";
$self->debug(": ok");
}
}
# In a pine box somewhere De Morgan is either spinning violently, or applauding. We're not
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.old view on Meta::CPAN
# --- MakeMaker tools_other section:
SHELL = /bin/sh
CHMOD = chmod
CP = cp
LD = cc
MV = mv
NOOP = $(SHELL) -c true
RM_F = rm -f
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.old view on Meta::CPAN
# --- MakeMaker tools_other section:
SHELL = /bin/sh
CHMOD = chmod
CP = cp
LD = cc
MV = mv
NOOP = $(SHELL) -c true
RM_F = rm -f
view all matches for this distribution
view release on metacpan or search on metacpan
conf/server.xml.PL view on Meta::CPAN
(my $file = basename $0) =~ s/\.PL$//;
$file =~ s/\.pl$// if ($Config{'osname'} eq 'VMS' or
$Config{'osname'} eq 'OS2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
chmod 0755, $file;
require '../.cfg';
print "Extracting $file (with variable substitutions)\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/ASP/ASPPage.pm view on Meta::CPAN
unlink( $s->pm_path ) if -f $s->pm_path;
open my $ofh, '>', $s->pm_path
or die "Cannot open '" . $s->pm_path . "' for writing: $!";
print $ofh $code;
close($ofh);
chmod( 0666, $s->pm_path );
}# end _assemble_code()
#==============================================================================
sub _get_directives
view all matches for this distribution
view release on metacpan or search on metacpan
0.22 Wed Jun 12 06:33:30 2003
- Try to fix the "extended" text in the documentation of module
0.23 Wed Jun 12 06:33:30 2003
- Fix the chmod on the files so that the installation will be able to manipulate
the files.
0.24 Sat Jun 21 06:33:30 2003
- Fix the Makefile.PL, to make sure that the module can not be made
without Net::LDAP
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Authen/Passphrase.pm view on Meta::CPAN
my $conf = eval { LoadFile $file } // undef;
$conf->{passphrase}=pwhash $pass;
$conf->{passphrase_version}=PASSPHRASE_VERSION;
DumpFile $file, $conf;
chmod 0660, $file;
}
sub pwcheck{
my ($user, $pass)=@_;
die INVALID_USER unless $user =~ USER_REGEX; ## no critic (RequireCarping)
view all matches for this distribution