"chmod -R 777 /" fatal error?

General support questions
Post Reply
cappalikutu
Posts: 4
Joined: 2014/07/18 11:27:57

"chmod -R 777 /" fatal error?

Post by cappalikutu » 2014/07/18 11:43:39

Hi, im new on linux based systems. I have a server that connectable with putty.
I used wrong ssh code to putty which is "chmod -R 777 /" while i was changing permission of a spesific folder.
After that mysqld down and i wanted to reboot system. Until this action, i couldt connect my system with putty.
When i went to server for manual reboot, i saw error which attach to post. It can be fixible problem? And how?

Thanks four your interest...
Attachments
Photo 18.07.2014 13 31 03.jpg
Photo 18.07.2014 13 31 03.jpg (60.35 KiB) Viewed 3905 times

drk
Posts: 405
Joined: 2014/01/30 20:38:28

Re: "chmod -R 777 /" fatal error?

Post by drk » 2014/07/18 16:38:22

Do you have a backup?

cappalikutu
Posts: 4
Joined: 2014/07/18 11:27:57

Re: "chmod -R 777 /" fatal error?

Post by cappalikutu » 2014/07/18 16:43:51

unfortunately :(

drk
Posts: 405
Joined: 2014/01/30 20:38:28

Re: "chmod -R 777 /" fatal error?

Post by drk » 2014/07/18 17:01:29

Well, you have a lot of work todo just to get to the point where there is a lot of work todo :(

Does yum work?

nbritton
Posts: 38
Joined: 2014/07/09 23:38:46

Re: "chmod -R 777 /" fatal error?

Post by nbritton » 2014/07/18 17:03:28

yum reinstall \*

cappalikutu
Posts: 4
Joined: 2014/07/18 11:27:57

Re: "chmod -R 777 /" fatal error?

Post by cappalikutu » 2014/07/18 17:05:30

there arent any user interface without that screenshot, i couldnt log in...

nbritton
Posts: 38
Joined: 2014/07/09 23:38:46

Re: "chmod -R 777 /" fatal error?

Post by nbritton » 2014/07/18 17:16:22

cappalikutu wrote:there arent any user interface without that screenshot, i couldnt log in...
Press Control + Alt + F1 and that should drop you down to a console based login screen. Alternatively you can reboot into non-graphical mode by adding systemd.unit=multi-user.target to the grub boot screen, and if that doesn't work there is always single user mode. At the grub boot prompt hit the e key and then press the down arrow key until you find the line that starts with linux16 /vmlinuz..., append systemd.unit=multi-user.target to the end of that line and then press Control + X.

User avatar
TrevorH
Forum Moderator
Posts: 29902
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: "chmod -R 777 /" fatal error?

Post by TrevorH » 2014/07/18 17:33:47

You can try running the following if you can logon at all!

Code: Select all

for p in $(rpm -qa); do rpm --setperms $p; rpm --setugids $p; done
That should reset all permissions on all files and directories that rpm thinks it owns. It may miss some but it should get most.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

cappalikutu
Posts: 4
Joined: 2014/07/18 11:27:57

Re: "chmod -R 777 /" fatal error?

Post by cappalikutu » 2014/08/14 08:12:12

TrevorH wrote:You can try running the following if you can logon at all!

Code: Select all

for p in $(rpm -qa); do rpm --setperms $p; rpm --setugids $p; done
That should reset all permissions on all files and directories that rpm thinks it owns. It may miss some but it should get most.
i entered this code and permission problem solved but also i couldnt use ssh already.

Post Reply

Return to “CentOS 7 - General Support”