You are not logged in.

#1 2007-05-31 13:41:30

hypermegachi
Member
Registered: 2004-07-25
Posts: 311

rsync permission problems [solved]

ok...

directory /files contains everything
directory /mnt/files is a samba cifs mounted share

here's my rsyncd.conf

[files]
path = /files
comment = FILE SERVER
read only = yes
uid = root
gid = root
hosts allow = 127.0.0.1

and this is the command i use to sync:
rsync -rtzv localhost::files /mnt/files/

i get the following errors:
rsync: failed to set times on "/some/directory/": Permission denied (13)
rsync: mkstemp "/some/directory or /some/directory/tmp.file" failed: Permission denied (13)
rsync: connection unexpectedly closed (68427 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(453) [generator=2.6.9]

now...if i'm logged in as root:
"touch test" works in /mnt/files

i get permission denied if i'm not root.  anyone got any ideas?

Last edited by hypermegachi (2007-05-31 15:49:18)

Offline

#2 2007-05-31 13:45:38

hypermegachi
Member
Registered: 2004-07-25
Posts: 311

Re: rsync permission problems [solved]

i got the following in my syslog:

Number of allowed concurrent connections exceeded; num='10', max='10'

google didn't come up with many results...

Offline

#3 2007-05-31 13:55:56

hypermegachi
Member
Registered: 2004-07-25
Posts: 311

Re: rsync permission problems [solved]

downgrading to syslog-ng 2.0.0 "fixes" that problem...

rsync permission is still messing up...

Offline

#4 2007-05-31 15:06:14

hungsonbk
Member
Registered: 2007-05-26
Posts: 105
Website

Re: rsync permission problems [solved]

This is what i have done with Rsync, hopefully it will help you. The important think with Rsync is that if you run Rsync as root, u must set the password file as 600. If others can read the password file, it will fail to load.



At the rsync server, edit the /etc/rsyncd.conf as the following:

uid = users
gid = users
use chroot = true
max connections = 4
syslog facility = local5
pid file = /var/run/rsyncd.pid

[web_backup]
path = /home/users/web_backup
comment = This is the backup of web server.
read only = no
auth users = abc
secrets file = /etc/rsyncd.secrets
hosts allow = rsync.client.ip


Create the password file /etc/rsyncd.secrets and each line is a username/password pair:
username:password

Important: change the mode of the password file or the authentication will fail:
#chmod g-r,o-r /etc/rsyncd.secrets

if you don't want to change the above mode, use strict modes = false in /etc/rsyncd.conf file


At the client, use the following command, or put this command into crontab:
#rsync -aP /var/www/html/* username@srync.server.ip::web_backup

or if you don't want to type the password everytime, create a password file with the content like this:
this_is_my_password

Again, this file can't be read by others or rsync will fail.

Note that this file contains only password, which is different from the /etc/rsyncd.secrets file
and use the command:
#rsync -aP /var/www/html/* username@srync.server.ip::web_backup --password-file=pass_file

Offline

#5 2007-05-31 15:40:17

hypermegachi
Member
Registered: 2004-07-25
Posts: 311

Re: rsync permission problems [solved]

thanks for the reply.  my rsync is set up for local host only with no authentication.

/mnt/files is a samba cifs mount.

so, i don't know how setting up a password file through rsync would fix the problem.

Offline

#6 2007-05-31 15:49:08

hypermegachi
Member
Registered: 2004-07-25
Posts: 311

Re: rsync permission problems [solved]

problem solved.
a file was in use on the windows 2003 server.

Offline

Board footer

Powered by FluxBB