Restore backup failed permission denied [Solved]

After reinstalling mate from a 32bit 14.04 to a 64bit 16.04 version the restore button is giving me a permission denied message. I have tried to reset the NTFS formatted external drives permissions and ownership with the instructions here, but I didn’t get permission to restore the backup, but I do have full access to the files on the drive.

fdisk is giving the following output, which I’ve never seen before
fdisk -l fdisk: cannot open /dev/ram0: Permission denied fdisk: cannot open /dev/ram1: Permission denied fdisk: cannot open /dev/ram2: Permission denied fdisk: cannot open /dev/ram3: Permission denied fdisk: cannot open /dev/ram4: Permission denied fdisk: cannot open /dev/ram5: Permission denied fdisk: cannot open /dev/ram6: Permission denied fdisk: cannot open /dev/ram7: Permission denied fdisk: cannot open /dev/ram8: Permission denied fdisk: cannot open /dev/ram9: Permission denied fdisk: cannot open /dev/ram10: Permission denied fdisk: cannot open /dev/ram11: Permission denied fdisk: cannot open /dev/ram12: Permission denied fdisk: cannot open /dev/ram13: Permission denied fdisk: cannot open /dev/ram14: Permission denied fdisk: cannot open /dev/ram15: Permission denied fdisk: cannot open /dev/sda: Permission denied fdisk: cannot open /dev/sdg: Permission denied

How do I get the backup files back?

NTFS doesn’t have permissions. Are you typing fdisk -l or sudo fdisk -l

Ok it works with sudo fdisk. Even to try to set up a new backup to that drive gives a permission failed error.

How is the backup type, is it a file containing all the files like *.tar.bz or *.zip? or are directories with multiple files? and how are you restoring it? And how did you do the backup, mannually or with a program?

You can manually copy the files as root if you press “Alt + F2” and then type:

gksudo caja

simply copy what you need but remember that you ARE ROOT!.:smiley:

@malwaredpc The backup is a folder with files named duplicity-full.[numberwordcombo].vol[number].difftar.gz. Well I presume it is, this is on a friend of mines machine and the files were hidden, that is the structure in my backup. I used the default program called Backups. To restore I went to the Backups. picked restore, then pointed it to the folder in the mounted drive.

It occurred to me afterwards that Backups is how it is named in Mate, the program is actually called deja-dup and I was googling the wrong questions. Found this answer later.

@wolfman doh! I had tried gksudo nautilus while tired. I can get the files off that way and hopefully it wont kick up any errors on a local drive.

1 Like

I don’t understand, is it fixed now? Did you put a password to the backup? It is in a NTFS partition or it is not?

It is not fixed yet. I need to get access to the drive as it is at a friends house. There is no password on the backup. Yes it is a NTFS drive. Basically I am getting as many things I can try when I try to restore the backup again.

So I got the external drive and was able to restore the backup without any issues. So the issue possibly is with the installation of mate, which used the defaults, with third party codecs etc and was updated with the latest packages. Or the chown command wasn’t the correct.

You may have chosen the directory to deploy wrongly?? Also, you could copy the backup to the deja-dup directory, and then change the permissions (if needed) as you said you changed permissions (which wouldn't affect the files in NTFS). Maybe your username is different from the one you had when you did the backup??

the command to change the permissions is:

sudo chown -R "$USER":"$USER" /path

I made a new user on my laptop to match the Desktop user, so I can double check they both match. Now that I have all the files restored I can setup a new backup from scratch, although the last time I tried a new backup there was also a permission error. I tried that chown before, but maybe I entered it incorrectly. If the file was mine then it would be

sudo chown -R $tadcan:tadcan /media/“removable drive”/backup_folder

Better

sudo chown -R tadcan:tadcan "/media/removable drive/backup_folder"

And more better

sudo chown -R "$USER":"$USER" "/media/removable drive/backup_folder"

1 Like

Thanks @malwarepc, that is possibly where I went wrong. Will know on Monday when I go back to my friends house.

Maybe, but remember that NTFS don’t have unix permissions, so you don’t need that on there but maybe on your file system.

It does seem strange that it works on my laptop and not on my friends Desktop. I can try it on my home Desktop later to see what happens there, which also runs the LTS version. I may have hit a inconsistent / hard to reproduce issue. If it doesn’t work I can look into different backup solutions. Or partition the drive and have an ext partition just for the auto backup.

At my friends house plugged in the drive and the restore happened without any issues. Didn’t have to do anything. The names of the user were the same. I had also performed a restore on my home Desktop without any issues either. There was a password, but the issue happened before a password was requested. Last week I did restart the PC to see if that would help, but the external drive wasn’t plugged out, maybe that would have worked.

Thanks for your help.

1 Like