Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When messing around with partitions under Windows when I tried to format empty space of the hard drive to have it in Windows, I messed something up and cfdisk told me that all the partitions did not start at the right physical boundaries, and I would face performance drops. Also swap was hanging on the wrong partition and Windows crashed on boot.

Well, I was not able to fix it but since I had an rsynced backup of my main arch linux system (rsync -aAXv / /mnt/ext) I dared to delete all partitions, create new ones, and put the backup back on the recreated linux partitions.

I mounted the backup external disk but it got mounted with 777 permissions. Before I noticed how it was mounted, I rsynced everything back and then noticed that my whole linux system is on 777 and everything owned by root. All files are there, the installation even boots up, but of course I can not work with everything, even home is owned by root with 777 permissions.

So, is there a way to, either mount the NTFS external disk with the old permissions, or restore the default permissions somehow else?

Thank you

PS: Forgot to mention but maybe interesting to know, that I did the first partition attemt on windows, thats why the partitions got messed up. Root and /home appeared as SFS and the windows-partition got "shifted" to sda3 where swap was earlier, so linux mounted the windows partion as swap what made windows crashing with BSOD on bootup.

share|improve this question
    
possible duplicate of Why is "chmod -R 777 /" destructive? –  dawud Jul 20 '13 at 8:44
    
Almost, but not quite, though the answer will be similar. –  Falcon Momot Jul 20 '13 at 19:20

1 Answer 1

up vote 4 down vote accepted

NTFS in particular is a bad choice for taking filewise backups of linux systems, because it uses windows' ACL model for permissions rather than the UNIX model. In consequence, the permissions on these volumes are determined by the mount options. Therefore, when you took the backup, you didn't back up the permissions metadata (permission bits or ownership).

See dawud's (automated) comment for why you can't restore "default" permissions (the short answer: there is no such thing), and some thoughts on what you might be able to do to recover (it will be long and tedious).

If you have windows stuff backed up to that NTFS disk also, the permissions metadata should be intact.

share|improve this answer
    
Yes, this seems obvious, that NTFS messes that up - just I didn't think about it when I made the backup. I need my external disks on both systems, that's why NTFS is the only choice, and it wouldn't be such a problem with normal data like text or pictures, but for system backup, I probably need a linux partition for linux-backups (or use NAS instead of USB-Disk). Thanks for your answer, I will look what I can do. Maybe I have to install the base system again and just copy /home and chown/mod it then after. –  Jherek Carnelian Jul 21 '13 at 18:39

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.