rsync on an SSHFS mount point

Turns out that
“If you plan [to] use rsync to sync files from your local machine to your ssh-server, you need “workaround=rename”
Otherwise, you will not be able to update an older version of a file with a newer one. Without this option, you will be able to create files and folders and delete them, but you will get an error like this, if you try to update a file:

rsync: rename "/path/to/file.Q3Btvn" -> "to/file": Operation not permitted (1)


The original entry was from a comment to this entry in Ubuntu Forums; reporting it here, as it was driving me insane (been wasting quite some time trying to figure whether it was a permission issue).

The complete /etc/fstab entry in my system looks something like:

# This mounts the entire filesystem of server on /mnt/server mountpoint
# Use with care!
sshfs#marco@server:/ /mnt/server fuse users,auto,workaround=rename 0 0

However, if you are mounting a Samba file server, and the path contains spaces, beware of the escape code for that being different from the URL one (%20) or the console (\ followed by space; as in: /fileserver/My\ Pictures).

/etc/fstab requires the 40 escape code to mount a filesystem with spaces in its pathname:

# This mounts the Samba share My Pictures on the NFS server 
#fileserver under /media/pictures
//fileserver/My40Pictures/ /media/pictures cifs user=guest,password=,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
Advertisements

One thought on “rsync on an SSHFS mount point

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s