Help restoring file permissions from a Dump
I have messed up my file permissions
sudo chmod -R 777 / instead of sudo chmod -R 777 /mnt/some_dir I have daily dump files and I would like to restore all the file permissions from these dumps, preferably without actually restoring the dumped files since restorign the files will overwrite all the things that I did today any help apprecated. I am running fedora core 3 regards Brendan |
Hi, and welcome to LQ!
Can I introduce you to one of LQ's most excellent features? It's the "search" button. http://www.linuxquestions.org/questi...der=descending There's a list of post with a similar topic. http://www.linuxquestions.org/questi...re+permissions http://www.linuxquestions.org/questi...re+permissions And this is probably what you wanted ... part of the search results. Cheers, Tink |
Quote:
I have a full and fairy up to date backup of my entire file system. I can if there are no other options restore the entire dump but would prefer to just restore the permissions from the dump file without actually restoring the files. .Brendan |
Sorry - my bad :}
/me makes the excuse that he had high fever and didn't think straight... What you could do is extract the information you need using tar -tvzf (or tvjf if bzip compressed) and feed that back to chmod ... a bit of scripting to translate -rw-r--r-- (and the likes) into something chmod can under- stand should be possible within a reasonable abount of time... tar -tvzf dump.tgz | awk '{print $1" "$6}' being the base you want to use... Cheers, Tink |
All times are GMT -5. The time now is 05:14 AM. |