[opensuse] fatal error in chmod-ing on root partition /
i've changed permission some files on / partition.... mars/: # chmod 755 -R * some aplication don't work well.... any experience on this? i think that the best way is reinstall it, isn't it?? cheers, chika -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 10 May 2007, chika wrote:
i've changed permission some files on / partition.... mars/: # chmod 755 -R *
Some files? No sir, you chmodded ALL files. Technically the option should have preceed the octal mode but I'm not about to try that out to see what happens.
some aplication don't work well....
any experience on this?
i think that the best way is reinstall it, isn't it??
Yup. I think that's probably wise, because it will take you longer to figure out what the permissions were before you did that than to set them back. I don't spoze you have a backup you could restore..... no, thought not. -- _____________________________________ John Andersen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Thursday 2007-05-10 at 23:40 -0800, John Andersen wrote:
On Thursday 10 May 2007, chika wrote:
i've changed permission some files on / partition.... mars/: # chmod 755 -R *
Ouch!
Some files? No sir, you chmodded ALL files.
Technically the option should have preceed the octal mode but I'm not about to try that out to see what happens.
i think that the best way is reinstall it, isn't it??
Yup. I think that's probably wise, because it will take you longer to figure out what the permissions were before you did that than to set them back. I don't spoze you have a backup you could restore..... no, thought not.
I think I read a method here, years ago, to restore the permissions from files that came from rpms, but the only thing I can see perusing the man is checking them. let me see... it is "--queryformat %{FILEMODES}". Now, the file name... Ok: cer@nimrodel:~> rpm -q -a --queryformat "%{FILEMODES}\t%{DIRNAMES} %{BASENAMES}\n" This outputs a list like: 16877 /usr 16877 /etc/udev 16877 /usr/share/latex2html 33188 /usr/share/susehelp/docserver/index.html.en 33261 /usr/lib/rpm/map-desktop-category.sh 33261 /usr/lib/libcrypto.so.0.9.7 41471 /usr/lib/libadns.so.1 33261 /lib/libgcc_s.so.1 33261 /usr/lib/libdns_sd.so Now, we have to get those "modes" into something we can use... Let me see: cer@nimrodel:~> rpm -q -a --queryformat "%{FILEMODES:octal}\t%{DIRNAMES}%{BASENAMES}\n" 40755 /usr 40755 /etc/udev 40755 /usr/share/latex2html 100644 /usr/share/susehelp/docserver/index.html.en 100755 /usr/lib/rpm/map-desktop-category.sh 100755 /usr/lib/libcrypto.so.0.9.7 120777 /usr/lib/libadns.so.1 100755 /lib/libgcc_s.so.1 Now, that sounds more familiar. The needed permissions are the three last digits. Now, some one with better scripting skills could extract the needed info... wait. Not quite, but nice: with ":perms" I get: drwxr-xr-x /usr drwxr-xr-x /etc/udev drwxr-xr-x /usr/share/latex2html - -rw-r--r-- /usr/share/susehelp/docserver/index.html.en - -rwxr-xr-x /usr/lib/rpm/map-desktop-category.sh Ok, so it is: write the list to a file extract the three last digits add chmod to the line execute the command. It wouldn't be too dificult, but I'm not in "bored programmer mode" today, so I leave that as an exercise to the culprit ;-) Of course, it will have to be executed from a rescue system, but using the damaged filesystem rpm database. Doable! ;-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGRFW4tTMYHG2NR9URAt7SAKCNrA9sLuxhXDgSOlxuohAgB5OZjgCdGtzk RA1Qt6U7yOk8nixMXByu2qg= =nMOo -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
did you try "SuSEconfig"? I think there is a "permission" module that set all at the /etc/permission status not sure, though jdd -- http://www.dodin.net Cécile, esthéticienne à Montpellier http://gourmandises.orangeblog.fr/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2007-05-11 at 14:12 +0200, jdd wrote:
did you try "SuSEconfig"?
I think there is a "permission" module that set all at the /etc/permission status
Yes, you are correct. But those permissions changes are applied to the files already installed from the rpm; if the rpm is correct, there is no need to modify them. Also, the script doesn't make a file executable or not. So, first chika has to restore the original permissions, then run "SuSEconfig --module permissions". Then, he will have to manually see to his personal and data files all over the place... Ouch. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGRHa1tTMYHG2NR9URAvEKAJ9WHRb1WH9I8vyk8yE17E8ib2c7OgCbBvX4 EhQAjQT/fVBlwHH+v3bS83Q= =vnn/ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hello, On Fri, 11 May 2007, Carlos E. R. wrote:
Now, we have to get those "modes" into something we can use... Let me see:
cer@nimrodel:~> rpm -q -a --queryformat "%{FILEMODES:octal}\t%{DIRNAMES}%{BASENAMES}\n" 40755 /usr 40755 /etc/udev 40755 /usr/share/latex2html 100644 /usr/share/susehelp/docserver/index.html.en
That shows only the first file of each package. You need to use a loop (using []) for the Arrayvariables of RPM: rpm -qa --queryformat "[%{FILEMODES:octal}\t%{FILENAMES}\n]" It's much easier though to just use --setperms mode of rpm: rpm -a --setperms HTH, -dnh -- 9: GUI Ein Hintergrundbild und 12 Xterms (Kristian Köhntopp) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2007-05-12 at 22:32 +0200, David Haller wrote:
On Fri, 11 May 2007, Carlos E. R. wrote:
Now, we have to get those "modes" into something we can use... Let me see:
cer@nimrodel:~> rpm -q -a --queryformat "%{FILEMODES:octal}\t%{DIRNAMES}%{BASENAMES}\n" 40755 /usr 40755 /etc/udev 40755 /usr/share/latex2html 100644 /usr/share/susehelp/docserver/index.html.en
That shows only the first file of each package. You need to use a loop (using []) for the Arrayvariables of RPM:
rpm -qa --queryformat "[%{FILEMODES:octal}\t%{FILENAMES}\n]"
Curious! Obviously, I didn't test it, I was just thinking aloud.
It's much easier though to just use --setperms mode of rpm:
rpm -a --setperms
Indeed! I knew there was a way, but I couldn't remember/find how. I'm saving your email for possible eventual need ;-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGRlGGtTMYHG2NR9URAkrtAJ95kSK3O0XAyrmFz1TznlNjd7d50QCggNxg pJfFYbe/ikRlO1LPfg52TKA= =TdBD -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Carlos E. R.
-
chika
-
David Haller
-
jdd
-
John Andersen