Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Backup with rsync - Permission Issues (fixed)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2196

PostPosted: Thu Sep 06, 2012 10:54 pm    Post subject: Backup with rsync - Permission Issues (fixed) Reply with quote

I'm backing up a 3 Tb array onto a single external drive for offsite backup, and I'm using rsync to accomplish this and running the command with root, and I'm running into some permission issues. Here's a sampling:

Code:
rsync: send_files failed to open "/mnt/external_storage/Backup/Server/Wed/etc/ssh/ssh_host_ecdsa_key": Permission denied (13)
rsync: send_files failed to open "/mnt/external_storage/Backup/Server/Wed/etc/ssh/ssh_host_rsa_key": Permission denied (13)
rsync: send_files failed to open "/mnt/external_storage/Backup/Server/Wed/etc/ssh/sshd_config": Permission denied (13)
rsync: send_files failed to open "/mnt/external_storage/Backup/Server/Wed/etc/ssl/apache2/server.key": Permission denied (13)
rsync: send_files failed to open "/mnt/external_storage/Backup/Server/Wed/etc/ssl/apache2/server.pem": Permission denied (13)


Etc.

The "/mnt/external_storage" is the source, the destination is "/mnt/backupdrive", here is the command I'm using to backup.

Code:
rsync -va --progress /mnt/external_storage/ /mnt/backupdrive/


The majority of files backed up, there are just a select few that aren't, here are the permissions on one of these files:

Code:
ls -la /mnt/external_storage/Backup/Server/Wed/etc/ssl/apache2/server.pem
-r-------- 1 someuser users 1930 Jan 25  2012 /mnt/external_storage/Backup/Server/Wed/etc/ssl/apache2/server.pem


Running the command as root I *thought* would access all files, was I mistaken?
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim


Last edited by Bigun on Sat Sep 08, 2012 9:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 474
Location: San Diego, California USA

PostPosted: Fri Sep 07, 2012 12:50 am    Post subject: Reply with quote

What kind of mount is /mnt/external_storage?

Is it a locally connected disk? If so, what filesystem is it using?

Is it network storage? If so, what protocol is it using?

The answer will give us clues as to why root can't access the directory.
Back to top
View user's profile Send private message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2196

PostPosted: Fri Sep 07, 2012 9:57 am    Post subject: Reply with quote

gentoo_ram wrote:
What kind of mount is /mnt/external_storage?

Here is the entry in /etc/fstab:

Code:
/dev/sdf1               /mnt/backupdrive        xfs     noauto,rw       0 0


gentoo_ram wrote:
Is it a locally connected disk? If so, what filesystem is it using?


Yes, it is a USB connected disk, and I have it formatted in the XFS filesystem.

gentoo_ram wrote:
Is it network storage? If so, what protocol is it using?


Nope.
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
Odward
n00b
n00b


Joined: 21 Mar 2012
Posts: 65

PostPosted: Fri Sep 07, 2012 10:54 pm    Post subject: Reply with quote

Bigun wrote:
gentoo_ram wrote:
What kind of mount is /mnt/external_storage?

Here is the entry in /etc/fstab:

Code:
/dev/sdf1               /mnt/backupdrive        xfs     noauto,rw       0 0




Not sure I can be of any help, but you may have provided answers regarding (DEST) /mnt/backupdrive and not (SRC) /mnt/external_storage
where the permission issue appears to be occurring.
Back to top
View user's profile Send private message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2196

PostPosted: Sat Sep 08, 2012 12:49 am    Post subject: Reply with quote

Odward wrote:
Bigun wrote:
gentoo_ram wrote:
What kind of mount is /mnt/external_storage?

Here is the entry in /etc/fstab:

Code:
/dev/sdf1               /mnt/backupdrive        xfs     noauto,rw       0 0




Not sure I can be of any help, but you may have provided answers regarding (DEST) /mnt/backupdrive and not (SRC) /mnt/external_storage
where the permission issue appears to be occurring.


:oops:

Crap, you are right:

Code:
//127.0.0.1/Media /mnt/external_storage cifs pass=test,user=bigun,uid=bigun,gid=users,rw,auto 0 0


You'll have to forgive me, my wife went into pre-term labor and I'm trying to deal with a lot at the moment, excuse the brief idiocy.

This also may have revealed why it wasn't working. Very long story, but the actual RAID is mounted here:

Code:
/dev/md125              /mnt/media      xfs             auto,rw         0 0


The reason for the CIFS mount is because I have a SAMBA share setup for use by several devices on the network, and if files written by the server (by programs like rtorrent) aren't done through the CIFS protocol, they won't be able to be read by other machines on the network through the SAMBA share.

That said, I erased all the data on the backup drive and am now trying to sync through "/mnt/media" to see if that has better luck.

I wish my wife would have this baby already so I would quit making these mistakes.
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2196

PostPosted: Sat Sep 08, 2012 9:20 pm    Post subject: Reply with quote

Yup, the very reason I setup CIFS and tried to do all transactions through was what I was encountering. Luckily I don't need to access apache configuration files through WDTV live or anything like that, so I just switched mounting points and it appeared to work just fine. Just to double check, I ran it again, and no errors:

Code:
rsync -va --progress /mnt/media/Media/ /mnt/backupdrive/
sending incremental file list

sent 6393292 bytes  received 112533 bytes  57829.56 bytes/sec
total size is 1862322738228  speedup is 286254.66

_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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