SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
permission denied error when making backups
Author Message
Post permission denied error when making backups 
Hi Duk,
I set up a regular user's account for rdiff-backup on my backup server as
well as a directory where I save the backed up files to. That directory has
permissions for only rdiff-backup user and group (chmod -R
rdiff-backup:rdiff-backup /dirname). On the servers that I want to be backed
up I also created a user account for rdiff-backup, and in addition to the
entry in /etc/sudoers, in the file at
/rdiff-backup_home/.ssh/authorized_keys I put this on one line:

command="sudo rdiff-backup --server --restrict-read-only
/",from="backup_server_IP_address",no-port-forwarding,no-X11-forwarding,no-pty
ssh-rsa AAAAB3NzaC1...long SSH public key here... ==
rdiff-backup < at > backup_server

Hopefully this helps.


Duk wrote:

Hi Weloki!

I've the same setup as yours and having the same problem, did you finally
found a solution?

I'm only able to do a full backup logging as root, and I don't want to do
that.... any help there?




weloki wrote:

On my server that I want backed up, I do not want to SSH into it as root,
so I've set up a special user that has an entry in /etc/sudoers to run
*only* the rdiff-backup command on the host with superuser privileges:

Cmnd_Alias RDIFFBACKUP = /usr/bin/rdiff-backup
rdiff-backup ALL = NOPASSWD: RDIFFBACKUP

...everything else about the user is normal. Now for any file that does
not have the chmod o+r (readable by "other") attribute I get this error
when trying to back it up:

ListError filename [Errno 13] Permission denied: '/path/to/filename'

The file permissions could look only like -------r-- and that would work,
in any other way, without the "r" for "other" I get the error. When I
perform backups logging in as root, backups are made fine.




--
View this message in context: http://old.nabble.com/permission-denied-error-when-making-backups-tp33447119p34044142.html
Sent from the rdiff-backup-users mailing list archive at Nabble.com.


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post permission denied error when making backups 
Hi Weloki!

I've the same setup as yours and having the same problem, did you finally
found a solution?

I'm only able to do a full backup logging as root, and I don't want to do
that.... any help there?




weloki wrote:

On my server that I want backed up, I do not want to SSH into it as root,
so I've set up a special user that has an entry in /etc/sudoers to run
*only* the rdiff-backup command on the host with superuser privileges:

Cmnd_Alias RDIFFBACKUP = /usr/bin/rdiff-backup
rdiff-backup ALL = NOPASSWD: RDIFFBACKUP

...everything else about the user is normal. Now for any file that does
not have the chmod o+r (readable by "other") attribute I get this error
when trying to back it up:

ListError filename [Errno 13] Permission denied: '/path/to/filename'

The file permissions could look only like -------r-- and that would work,
in any other way, without the "r" for "other" I get the error. When I
perform backups logging in as root, backups are made fine.


--
View this message in context: http://old.nabble.com/permission-denied-error-when-making-backups-tp33447119p34043745.html
Sent from the rdiff-backup-users mailing list archive at Nabble.com.


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post permission denied error when making backups 
Hi Welloki,

Thank you very much for your help! I finally managed to do it Smile effectively
I was missing the "sudo rdiff-backup ...." statement in the
ssh/authorized_keys now everything goes fantastic.

As well I found a tutorial it helped me to clarify me a bit more, I leave
the link here in case someone needs it:

http://www.mad-hacking.net/documentation/linux/reliability/backup/using-rdiff-backup-remote.xml
http://www.mad-hacking.net/documentation/linux/reliability/backup/using-rdiff-backup-remote.xml


Thanks again Weloki, happy backup Smile


weloki wrote:

Hi Duk,
I set up a regular user's account for rdiff-backup on my backup server as
well as a directory where I save the backed up files to. That directory
has permissions for only rdiff-backup user and group (chmod -R
rdiff-backup:rdiff-backup /dirname). On the servers that I want to be
backed up I also created a user account for rdiff-backup, and in addition
to the entry in /etc/sudoers, in the file at
/rdiff-backup_home/.ssh/authorized_keys I put this on one line:

command="sudo rdiff-backup --server --restrict-read-only
/",from="backup_server_IP_address",no-port-forwarding,no-X11-forwarding,no-pty
ssh-rsa AAAAB3NzaC1...long SSH public key here... ==
rdiff-backup < at > backup_server

Hopefully this helps.


Duk wrote:

Hi Weloki!

I've the same setup as yours and having the same problem, did you finally
found a solution?

I'm only able to do a full backup logging as root, and I don't want to do
that.... any help there?




weloki wrote:

On my server that I want backed up, I do not want to SSH into it as
root, so I've set up a special user that has an entry in /etc/sudoers to
run *only* the rdiff-backup command on the host with superuser
privileges:

Cmnd_Alias RDIFFBACKUP = /usr/bin/rdiff-backup
rdiff-backup ALL = NOPASSWD: RDIFFBACKUP

...everything else about the user is normal. Now for any file that does
not have the chmod o+r (readable by "other") attribute I get this error
when trying to back it up:

ListError filename [Errno 13] Permission denied: '/path/to/filename'

The file permissions could look only like -------r-- and that would
work, in any other way, without the "r" for "other" I get the error.
When I perform backups logging in as root, backups are made fine.






--
View this message in context: http://old.nabble.com/permission-denied-error-when-making-backups-tp33447119p34055628.html
Sent from the rdiff-backup-users mailing list archive at Nabble.com.


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB