Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th November 2008, 22:55
unsichtbare unsichtbare is offline
Senior Member
 
Join Date: Sep 2007
Posts: 111
Thanks: 18
Thanked 7 Times in 6 Posts
Default problems with rsync

When I run rsync I get:

Code:
rsync: opendir "/var/www/web5/user/web5_rsts/Maildir" failed: Permission denied (13)
rsync: opendir "/var/www/web5/user/web5_rsts/.spamassassin" failed: Permission denied (13)
rsync: opendir "/var/www/web5/user/web5_test/Maildir" failed: Permission denied (13)
rsync: opendir "/var/www/web5/user/web5_test/.spamassassin" failed: Permission denied (13)
Although it does successfully copy some files.

Also, when I try to automate the rsync process following the tutorial, it still asks for a password, then fails.

Code:
root@mirrior1:~# rsync -avz --delete --exclude=**/stats --exclude=**/error --exclude=**/files/pictures -e "ssh -i /root/rsync/mirror-rsync-key" someuser@clients1.myserver.com:/var/www/ /var/www/
someuser@clients1.myserver.com's password:
bash: /home/someuser/rsync/checkrsync: /bin/shcase: bad interpreter: No such file or directory
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: remote command could not be run (code 126) at io.c(454) [receiver=2.6.9]
Yes I actually created a user account "someuser", following the tutorial.

Any suggestions?

One other thing, when I ran:

Code:
ssh-keygen -t dsa -b 2048 -f /root/rsync/mirror-rsync-key
as root, it told me that the key needed to be 1024 bits so I changed 2048 to 1024 and re-ran it.

-J
__________________
Ubuntu 14.04 - The Perfect Setup
ISPConfig 3.0.5
http://www.vmsources.com
Reply With Quote
Sponsored Links
  #2  
Old 25th November 2008, 11:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,778
Thanks: 821
Thanked 5,333 Times in 4,184 Posts
Default

Please run the rsync command as root user, otherwise the process does not has the permissions to copy the files.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th November 2008, 19:22
unsichtbare unsichtbare is offline
Senior Member
 
Join Date: Sep 2007
Posts: 111
Thanks: 18
Thanked 7 Times in 6 Posts
Default

Code:
login as: root
root@XX.YY.ZZ.103's password:
Last login: Mon Nov 24 08:13:47 2008 from 
Linux mirrior1.myserver.com 2.6.20-15-server #2 SMP Sun Apr 15 07:41:34 UTC                        2007 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
root@mirrior1:~# rsync -avz --delete --exclude=**/stats --exclude=**/error --exclude=**/files/pictures -e "ssh -i /root/rsync/mirror-rsync-key" someuser@clients1.myserver.com:/var/www/ /var/www/
someuser@clients1.myserver.com's password:
bash: /home/someuser/rsync/checkrsync: /bin/shcase: bad interpreter: No such file or directory
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: remote command could not be run (code 126) at io.c(454) [receiver=2.6.9]
root@mirrior1:~#
I was careful to run commands either as "someuser" or root as specified in the tutorial.

-J
__________________
Ubuntu 14.04 - The Perfect Setup
ISPConfig 3.0.5
http://www.vmsources.com
Reply With Quote
  #4  
Old 26th November 2008, 12:24
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,778
Thanks: 821
Thanked 5,333 Times in 4,184 Posts
Default

Yes, but if someuser has not the permissions to read files, it can not be synced
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 26th November 2008, 16:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

What's in /home/someuser/rsync/checkrsync?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 12th December 2008, 17:13
unsichtbare unsichtbare is offline
Senior Member
 
Join Date: Sep 2007
Posts: 111
Thanks: 18
Thanked 7 Times in 6 Posts
Default

/home/someuser/rsync/checkrsync
Code:
#!/bin/shcase "$SSH_ORIGINAL_COMMAND" in        *\&*)                echo "Rejected"                ;;        *\(*)                echo "Rejected"                ;;        *\{*)                echo "Rejected"                ;;        *\;*)                echo "Rejected"                ;;        *\<*)                echo "Rejected"                ;;        *\`*)                echo "Rejected"                ;;        rsync\ --server*)                $SSH_ORIGINAL_COMMAND                ;;        *)                echo "Rejected"                ;;esac
~

-J
__________________
Ubuntu 14.04 - The Perfect Setup
ISPConfig 3.0.5
http://www.vmsources.com
Reply With Quote
  #7  
Old 13th December 2008, 18:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

The problem is that you have everything in one line. It must look like this instead:

Code:
#!/bin/sh

case "$SSH_ORIGINAL_COMMAND" in
        *\&*)
                echo "Rejected"
                ;;
        *\(*)
                echo "Rejected"
                ;;
        *\{*)
                echo "Rejected"
                ;;
        *\;*)
                echo "Rejected"
                ;;
        *\<*)
                echo "Rejected"
                ;;
        *\`*)
                echo "Rejected"
                ;;
        rsync\ --server*)
                $SSH_ORIGINAL_COMMAND
                ;;
        *)
                echo "Rejected"
                ;;
esac
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 12th August 2011, 19:50
andrercmeira andrercmeira is offline
Junior Member
 
Join Date: Aug 2011
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I use rsync in my server, vmail copy normaly, but www not copy,

i follow http://www.howtoforge.com/mirroring_with_rsync,

its work for vmail, my reverse dns files, but not for /var/www

Code:
root@johan:/var/vmail# rsync -avzu --delete --exclude=*/tmp/ --exclude=.bash_history -e "ssh -i /root/rsync/mirror-rsync-key" sincronismo@servidor1.izaz.com.br:/var/www/ /var/www/
receiving incremental file list
rsync: opendir "/var/www/clients/client1/web1/cgi-bin" failed: Permission denied (13)
IO error encountered -- skipping file deletion
rsync: opendir "/var/www/clients/client1/web1/ssl" failed: Permission denied (13)
rsync: opendir "/var/www/clients/client1/web1/web" failed: Permission denied (13)
rsync: opendir "/var/www/clients/client2/web2" failed: Permission denied (13)
rsync: opendir "/var/www/clients/client2/web3" failed: Permission denied (13)

sent 225 bytes  received 94091 bytes  188632.00 bytes/sec
total size is 49697052  speedup is 526.92
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1526) [generator=3.0.7]
Reply With Quote
  #9  
Old 13th August 2011, 11:25
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

There seems to be a permissions problem. Can you, for example, post the output of
Code:
ls -la /var/www/clients/client1/web1/cgi-bin/
?

BTW, you use ISPConfig 3, not 2, right? Because this is the ISPConfig 2 forum...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 21st October 2011, 16:33
Ripeed Ripeed is offline
Member
 
Join Date: Oct 2011
Posts: 85
Thanks: 11
Thanked 1 Time in 1 Post
 
Default

Hi, I have the same problem. I dont want to use root for rsync but I dont know how get read rights to some user.

This is my output

Code:
root@sue:~# ls -la /var/www/clients/client1/web1/cgi-bin/
total 8
drwxr-x--x 2 web1 client0 4096 Oct  6 10:07 .
drwxr-x--x 6 web1 client1 4096 Oct 10 10:03 ..
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync: opendir "/var/www/web44/web" failed: Permission denied (13) adrenalinic HOWTO-Related Questions 7 4th August 2009 13:16
a backup server by RSYNC + SSH in a chrooted environment paguira Server Operation 3 23rd August 2008 16:44
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 09:11
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 17:17
Empty Recycle Bin jon335 General 40 6th May 2006 11:56


All times are GMT +2. The time now is 18:21.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.