Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to backup a folder from a remote server in a local folder encrypted with encfs. The files in the remote folder are owned by different users and I want to keep ownerships. The local folder is in an external HDD.

The remote server cannot be connected by root using ssh. So, I appended to /etc/sudoers :

remote_user ALL= NOPASSWD:/usr/bin/rsync

I was trying with rsync:

sudo rsync -e ssh -vauzP --delete --rsync-path='sudo rsync' remote_user@{REMOTE_IP}:/home/remote_user/remote_folder/ /media/external_disc/Encfs/local_folder/

But I lose ownership in the local_folder. Even though I mount the encrypted folder as root using --public, the owner of the backup files is the local_user.

Any solution?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.