LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help restoring file permissions from a Dump (https://www.linuxquestions.org/questions/linux-newbie-8/help-restoring-file-permissions-from-a-dump-265360/)

bminish 12-11-2004 06:44 PM

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

Tinkster 12-11-2004 09:25 PM

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

bminish 12-12-2004 06:10 AM

Quote:

Originally posted by Tinkster
Hi, and welcome to LQ!

Can I introduce you to one of LQ's most excellent
features? It's the "search" button.

Cheers,
Tink

Thanks Tink but the search results only deal with restoring permissions from the rpm database, whilst this is useful this does not actually help me much
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

Tinkster 12-12-2004 01:34 PM

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.