Permissions issues with mounting remote server into a specific folder
I'm doing the following to mount a remote server to a specific path on my server:
sshfs [email protected]:/backup/folder/ /home/myuser/server-backups/
However when I mount the server the folder permissions change (they become 700), and when I test my rsnapshot.conf file I get the following error:
snapshot_root /home/myuser/server-backups/ - snapshot_root exists \
but is not readable
What am I doing wrong ? should I mount the remote server with another user ?
Solution 1:
On the backup server make a directory to put the backups in
mkdir /home/patrick/backups
On your vps
Add your user account to the fuse group
sudo usermod -a -G fuse patrick
Edit the /etc/fuse.conf
file and uncomment or add the line
user_allow_other
make a mount point for sshfs and connect to it
mkdir /backups
sshfs [email protected]:/home/patrick/backups /backups -o allow_root
You should now have a /backups
directory that you can use rsnapshot with on your vps.
Solution 2:
You could try the -o allow_root
and -o allow_other
options to sshfs.