3

All topics that I've come across involved rsync over ssh or rsync using a user with restricted access.

I'm getting permission denied (13) errors as root. Here are my config files:

/etc/rsyncd.conf:

auth users = backup, root
secrets file = /etc/rsyncd.secrets

[backupdir]
    path = /backupdir

/etc/rsyncd.secrets (file mode 600, owner root, group root):

backup:backuppassword
root:rootpassword

The bash script that performs the rsync:

export RSYNC_PASSWORD=rootpassword

rsync -a --verbose --delete rsync://root@myserver/backupdir mydestination

The bash script above and mydestination reside on a Win XP machine and myserver is a Debian server.

4

From the mainpage for rsyncd.conf:

auth users
       This parameter specifies a comma and space-separated list of usernames
       that will be allowed to connect to this module. The usernames do not need
       to exist on the local system. [...]

I.e., the usernames you choose for the rsync daemon are not linked to the system's users of the same name.

You can, however, set the user-ID and group-ID that the rsync daemon should use when accessing files (at least when you have started the daemon with root priviledges):

uid    This  parameter  specifies  the user name or user ID that file transfers to
       and from that module should take place as when the daemon was run as root.
       In combination with the "gid" parameter this determines what file permissions
       are available. The default is uid -2, which is normally the user "nobody".

gid    This parameter specifies the group name or group ID that file transfers to
       and from that module should take place as when the daemon  was  run  as  root.
       This complements the "uid" parameter. The default is gid -2, which is normally
       the group "nobody".

For example:

uid = johndoe
gid = johndoe
  • Thanks! That worked. I'm no longer getting permission errors. – Ash Sep 11 '13 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.