Apache2-FileManager

 view release on metacpan or  search on metacpan

FileManager.pm  view on Meta::CPAN

 File::NCopy     => 0.32
 File::Remove    => 0.20

=head1 SPECIAL NOTES

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

To use the rync functionality you must have ssh, rsync, and the L<File::Rsync>
perl module installed on the development server. You also must have an sshd 
running on the production server.

Make sure you always fully qualify your server names so you don't have 

FileManager.pm  view on Meta::CPAN

   - dev_server> chown -R nobody.nobody /usr/local/apache/nobody
   - edit passwd file and set new home area for nobody
   - dev_server> su - nobody
   - dev_server> ssh-keygen -t dsa      (don't use passphrase)
   - dev_server> ssh production_server 
     (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>
   SetHandler           perl-script
   PerlHandler          Apache2::FileManager
   PerlSetVar           RSYNC_TO   production_server:/web/xyz
 </Location>



( run in 0.585 second using v1.01-cache-2.11-cpan-496ff517765 )