Ubuntu – get an “Operation not permitted” error when running duplicity as sudo

backupchownduplicity

Currently I'm backing up my /home/ folder to a usb mounted on /media/liamzebedee/X using duplicity. When I go to restore the folder to the USB however (using sudo), I get the error –

Error '[Errno 1] Operation not permitted: '/media/liamzebedee/X/home'' processing .

The files are all restored, why do I get this error?

Best Answer

I receive this error because duplicity cannot chown the restored home folder /media/liamzebedee/X/home to its original owner root. When restoring to / this works.

Related Question