Fix permissions in /usr/lib after chmod on dir [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite













This question already has an answer here:



  • Wrongly set chmod / 777. Problems?

    4 answers



I "accidentally" ran



sudo chmod -R 0755 /usr/lib


And now many things in my system don't work. Is there a cure for this (Manjaro 17.1) that doesn't involve re-installing my entire system?







share|improve this question












marked as duplicate by Rui F Ribeiro, DopeGhoti, G-Man, Jeff Schaller, mdpc Jan 4 at 0:23


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Boot from a pen and chmod file by file with the help of Google. It is guaranteed to be a good pastime; trial and error might keep you entertained until Spring.
    – Rui F Ribeiro
    Jan 3 at 21:03











  • Why is this downvoted?
    – ash
    Jan 3 at 21:19










  • I didn’t downvote, but maybe somebody did for lack of research. See this, this, this, this, and this.
    – G-Man
    Jan 3 at 22:56















up vote
0
down vote

favorite













This question already has an answer here:



  • Wrongly set chmod / 777. Problems?

    4 answers



I "accidentally" ran



sudo chmod -R 0755 /usr/lib


And now many things in my system don't work. Is there a cure for this (Manjaro 17.1) that doesn't involve re-installing my entire system?







share|improve this question












marked as duplicate by Rui F Ribeiro, DopeGhoti, G-Man, Jeff Schaller, mdpc Jan 4 at 0:23


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Boot from a pen and chmod file by file with the help of Google. It is guaranteed to be a good pastime; trial and error might keep you entertained until Spring.
    – Rui F Ribeiro
    Jan 3 at 21:03











  • Why is this downvoted?
    – ash
    Jan 3 at 21:19










  • I didn’t downvote, but maybe somebody did for lack of research. See this, this, this, this, and this.
    – G-Man
    Jan 3 at 22:56













up vote
0
down vote

favorite









up vote
0
down vote

favorite












This question already has an answer here:



  • Wrongly set chmod / 777. Problems?

    4 answers



I "accidentally" ran



sudo chmod -R 0755 /usr/lib


And now many things in my system don't work. Is there a cure for this (Manjaro 17.1) that doesn't involve re-installing my entire system?







share|improve this question













This question already has an answer here:



  • Wrongly set chmod / 777. Problems?

    4 answers



I "accidentally" ran



sudo chmod -R 0755 /usr/lib


And now many things in my system don't work. Is there a cure for this (Manjaro 17.1) that doesn't involve re-installing my entire system?





This question already has an answer here:



  • Wrongly set chmod / 777. Problems?

    4 answers









share|improve this question











share|improve this question




share|improve this question










asked Jan 3 at 20:54









ash

1093




1093




marked as duplicate by Rui F Ribeiro, DopeGhoti, G-Man, Jeff Schaller, mdpc Jan 4 at 0:23


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Rui F Ribeiro, DopeGhoti, G-Man, Jeff Schaller, mdpc Jan 4 at 0:23


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • Boot from a pen and chmod file by file with the help of Google. It is guaranteed to be a good pastime; trial and error might keep you entertained until Spring.
    – Rui F Ribeiro
    Jan 3 at 21:03











  • Why is this downvoted?
    – ash
    Jan 3 at 21:19










  • I didn’t downvote, but maybe somebody did for lack of research. See this, this, this, this, and this.
    – G-Man
    Jan 3 at 22:56

















  • Boot from a pen and chmod file by file with the help of Google. It is guaranteed to be a good pastime; trial and error might keep you entertained until Spring.
    – Rui F Ribeiro
    Jan 3 at 21:03











  • Why is this downvoted?
    – ash
    Jan 3 at 21:19










  • I didn’t downvote, but maybe somebody did for lack of research. See this, this, this, this, and this.
    – G-Man
    Jan 3 at 22:56
















Boot from a pen and chmod file by file with the help of Google. It is guaranteed to be a good pastime; trial and error might keep you entertained until Spring.
– Rui F Ribeiro
Jan 3 at 21:03





Boot from a pen and chmod file by file with the help of Google. It is guaranteed to be a good pastime; trial and error might keep you entertained until Spring.
– Rui F Ribeiro
Jan 3 at 21:03













Why is this downvoted?
– ash
Jan 3 at 21:19




Why is this downvoted?
– ash
Jan 3 at 21:19












I didn’t downvote, but maybe somebody did for lack of research. See this, this, this, this, and this.
– G-Man
Jan 3 at 22:56





I didn’t downvote, but maybe somebody did for lack of research. See this, this, this, this, and this.
– G-Man
Jan 3 at 22:56











1 Answer
1






active

oldest

votes

















up vote
2
down vote













For a complete and proper fix, you're probably looking at restoring from a backup (you do have a backup, right?) or reinstall. Just doing an ad-hoc find /usr/lib -type f -exec ls -l "" ; | grep '^-..x..x..x' on one of my boxen shows a vast scattering of non-directories which should be executable on your host. But not everything is meant to be executable.






share|improve this answer




















  • Egad, don’t parse the output of ls!  Do find /usr/lib -type f -perm -111 (or, perhaps more usefully, -perm /111).  Or, if you have GNU find, you can use -executable, but that’s of dubious usefulness.  If checks whether the file is executable by you, so, if you aren’t root, it will miss files with modes like 744.
    – G-Man
    Jan 3 at 22:30











  • Not to mention not everything should be 0644 or 0755 either. E.g., 4755 for /usr/lib/openssh/ssh-keysign on my Debian box. I would guess loss of set-id bits is what broke the system.
    – derobert
    Jan 3 at 22:32











  • BTW: An alternative you might suggest is to install a different machine (or VM) with a fresh install with the same packages. Then copy the permissions over.
    – derobert
    Jan 3 at 22:35

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote













For a complete and proper fix, you're probably looking at restoring from a backup (you do have a backup, right?) or reinstall. Just doing an ad-hoc find /usr/lib -type f -exec ls -l "" ; | grep '^-..x..x..x' on one of my boxen shows a vast scattering of non-directories which should be executable on your host. But not everything is meant to be executable.






share|improve this answer




















  • Egad, don’t parse the output of ls!  Do find /usr/lib -type f -perm -111 (or, perhaps more usefully, -perm /111).  Or, if you have GNU find, you can use -executable, but that’s of dubious usefulness.  If checks whether the file is executable by you, so, if you aren’t root, it will miss files with modes like 744.
    – G-Man
    Jan 3 at 22:30











  • Not to mention not everything should be 0644 or 0755 either. E.g., 4755 for /usr/lib/openssh/ssh-keysign on my Debian box. I would guess loss of set-id bits is what broke the system.
    – derobert
    Jan 3 at 22:32











  • BTW: An alternative you might suggest is to install a different machine (or VM) with a fresh install with the same packages. Then copy the permissions over.
    – derobert
    Jan 3 at 22:35














up vote
2
down vote













For a complete and proper fix, you're probably looking at restoring from a backup (you do have a backup, right?) or reinstall. Just doing an ad-hoc find /usr/lib -type f -exec ls -l "" ; | grep '^-..x..x..x' on one of my boxen shows a vast scattering of non-directories which should be executable on your host. But not everything is meant to be executable.






share|improve this answer




















  • Egad, don’t parse the output of ls!  Do find /usr/lib -type f -perm -111 (or, perhaps more usefully, -perm /111).  Or, if you have GNU find, you can use -executable, but that’s of dubious usefulness.  If checks whether the file is executable by you, so, if you aren’t root, it will miss files with modes like 744.
    – G-Man
    Jan 3 at 22:30











  • Not to mention not everything should be 0644 or 0755 either. E.g., 4755 for /usr/lib/openssh/ssh-keysign on my Debian box. I would guess loss of set-id bits is what broke the system.
    – derobert
    Jan 3 at 22:32











  • BTW: An alternative you might suggest is to install a different machine (or VM) with a fresh install with the same packages. Then copy the permissions over.
    – derobert
    Jan 3 at 22:35












up vote
2
down vote










up vote
2
down vote









For a complete and proper fix, you're probably looking at restoring from a backup (you do have a backup, right?) or reinstall. Just doing an ad-hoc find /usr/lib -type f -exec ls -l "" ; | grep '^-..x..x..x' on one of my boxen shows a vast scattering of non-directories which should be executable on your host. But not everything is meant to be executable.






share|improve this answer












For a complete and proper fix, you're probably looking at restoring from a backup (you do have a backup, right?) or reinstall. Just doing an ad-hoc find /usr/lib -type f -exec ls -l "" ; | grep '^-..x..x..x' on one of my boxen shows a vast scattering of non-directories which should be executable on your host. But not everything is meant to be executable.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 3 at 21:01









DopeGhoti

40.5k54979




40.5k54979











  • Egad, don’t parse the output of ls!  Do find /usr/lib -type f -perm -111 (or, perhaps more usefully, -perm /111).  Or, if you have GNU find, you can use -executable, but that’s of dubious usefulness.  If checks whether the file is executable by you, so, if you aren’t root, it will miss files with modes like 744.
    – G-Man
    Jan 3 at 22:30











  • Not to mention not everything should be 0644 or 0755 either. E.g., 4755 for /usr/lib/openssh/ssh-keysign on my Debian box. I would guess loss of set-id bits is what broke the system.
    – derobert
    Jan 3 at 22:32











  • BTW: An alternative you might suggest is to install a different machine (or VM) with a fresh install with the same packages. Then copy the permissions over.
    – derobert
    Jan 3 at 22:35
















  • Egad, don’t parse the output of ls!  Do find /usr/lib -type f -perm -111 (or, perhaps more usefully, -perm /111).  Or, if you have GNU find, you can use -executable, but that’s of dubious usefulness.  If checks whether the file is executable by you, so, if you aren’t root, it will miss files with modes like 744.
    – G-Man
    Jan 3 at 22:30











  • Not to mention not everything should be 0644 or 0755 either. E.g., 4755 for /usr/lib/openssh/ssh-keysign on my Debian box. I would guess loss of set-id bits is what broke the system.
    – derobert
    Jan 3 at 22:32











  • BTW: An alternative you might suggest is to install a different machine (or VM) with a fresh install with the same packages. Then copy the permissions over.
    – derobert
    Jan 3 at 22:35















Egad, don’t parse the output of ls!  Do find /usr/lib -type f -perm -111 (or, perhaps more usefully, -perm /111).  Or, if you have GNU find, you can use -executable, but that’s of dubious usefulness.  If checks whether the file is executable by you, so, if you aren’t root, it will miss files with modes like 744.
– G-Man
Jan 3 at 22:30





Egad, don’t parse the output of ls!  Do find /usr/lib -type f -perm -111 (or, perhaps more usefully, -perm /111).  Or, if you have GNU find, you can use -executable, but that’s of dubious usefulness.  If checks whether the file is executable by you, so, if you aren’t root, it will miss files with modes like 744.
– G-Man
Jan 3 at 22:30













Not to mention not everything should be 0644 or 0755 either. E.g., 4755 for /usr/lib/openssh/ssh-keysign on my Debian box. I would guess loss of set-id bits is what broke the system.
– derobert
Jan 3 at 22:32





Not to mention not everything should be 0644 or 0755 either. E.g., 4755 for /usr/lib/openssh/ssh-keysign on my Debian box. I would guess loss of set-id bits is what broke the system.
– derobert
Jan 3 at 22:32













BTW: An alternative you might suggest is to install a different machine (or VM) with a fresh install with the same packages. Then copy the permissions over.
– derobert
Jan 3 at 22:35




BTW: An alternative you might suggest is to install a different machine (or VM) with a fresh install with the same packages. Then copy the permissions over.
– derobert
Jan 3 at 22:35


Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay