WE_Frontend::Publish::Rsync

WE_Frontend::Publish::Rsync is a Perl module that allows to publish files via the rsync protocol.
Download

WE_Frontend::Publish::Rsync Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Slaven Rezic
  • Publisher web site:
  • http://search.cpan.org/~srezic/

WE_Frontend::Publish::Rsync Tags


WE_Frontend::Publish::Rsync Description

WE_Frontend::Publish::Rsync is a Perl module that allows to publish files via the rsync protocol. WE_Frontend::Publish::Rsync is a Perl module that allows to publish files via the rsync protocol.SYNOPSIS use WE_Frontend::Main2; use WEsiteinfo qw($c); $c->staging->transport("rsync"); $main->publish;TUTORIAL FOR RSYNC SETUP(See also "Update" section below)First make sure that both sides have rsync installed. Please use version 2.5.1 or better, because there are deadlock problems with older versions. Then SSH authentification should be setup. Do the following:Create a SSH public key for the local (source) side. If the CGI scripts are running under a special www user (such as wwwrun on Linux SuSE systems), you have first to create a home directory for this user or let the CGI scripts run under another user. If you do not know the uid for CGI scripts, then create this tiny script and run it as an CGI: #!/usr/bin/env perl use CGI qw(:standard); print header, join(",", getpwuid($>));The user id should be the third entry, the home directory the eighth entry.Assuming you want to create a home directory for wwwrun (this may be insecure!), you have to do following (all as superuser):mkdir /home/wwwrun vipw replace the old home directory for wwwrun with /home/wwwrun make sure that the user has a valid shell quit vipwNow change to the wwwuser user by typing su wwwuserand generate a ssh private/public key pair:ssh-keygen -N "" cat /home/wwwrun/.ssh/identity.pubYou should see the public key on the screen.This public key should be made accessible on the remote side. Switch to another virtual terminal or xterm, login to the remote side as the remote user and do following: In the home directory: mkdir .ssh chmod 700 .ssh cd .ssh cat > authorized_keys copy and paste the previous public key (is it still on the screen?) and press Control-D chmod 600 authorized_keysThat is it! Now check whether the connection works. As wwwuser, type the following: ssh -v -l remoteuser remotehostThe first time, you will get a message whether to accept the host. Accept, and then you should be automatically logged in without prompting for a password. If not, read carefully the messages. Most likely there is a permission problem on the local or remote side. Make sure that permissions are as tight as possible for the files in .ssh, and the .ssh and home directories itself.To check whether rsync works, do the following from the local side: rsync -Pv some_file remoteuser@remotehost:Now some_file should be copied to the remote side without prompting for a password. If you have an old rsync, you have to add -e ssh to the options (but better upgrade). If you redo the operation, the copy should be done much faster, because they are no changes to be transferred. Requirements: · Perl


WE_Frontend::Publish::Rsync Related Software