0

I am using rsnapshot to store snapshots. I would like root to be able to write to it so rsnapshot can run. I can't change permissions because I want to preserve them so each user can still only access their own files. I would like to give users read only access to it so they can restore their files on their own.

What is the best way to implement this?

I currently have the rsnapshots repository going to a separate partition. There are other things on that partition (secondary backup repository, security files, etc)

I tried the following:

/storage is 770 owned by root:root
/storage/snapshots is 755 owned by root:root

I want the RO folder to be at /home/snapshots. /home and /storage are mount points for two separate partitions. My snapshots are stored in /storage/snapshots

mount --bind /storage/snapshots /home/snapshots
mount -o remount,ro /home/snapshots

when I view as a normal user, the folder is empty. when I view as root, I can see all the files

eng3
  • 279
  • Loopback mount might work. Possibly NFS or CIFS with those being mounted RO but the underlying files otherwise inaccessible to your users so they can't accidentally destroy the backups you've taken. – Chris Davies May 12 '19 at 11:40
  • 1
    Check out the 2nd answer to a similar question. Mount rw under root-access only directory, bind mount to public-access directory, remount,ro the second directory. – meuh May 12 '19 at 13:17
  • I wasnt sure if I should update mine or the other one so I updated mine. Please see above – eng3 May 13 '19 at 08:12

0 Answers0