Chmod 644 on /etc/ any way to fix?
Posted
by
DazSlayer
on Super User
See other posts from Super User
or by DazSlayer
Published on 2012-10-08T02:47:42Z
Indexed on
2012/10/08
3:39 UTC
Read the original article
Hit count: 501
I tried to tab complete something and I guess it wasnt there. I know you are not supposed to set the permissions to /etc/ like that, but my permissions seem to be all messed up. whoami prints out cannot find name for user ID 1002 and I cannot cd into /etc/ anymore. passwd and shadow use 640 and 644 so I am not sure why this is a problem. Regardless, is there any way to fix this?
The command run was sudo chmod 644 /etc/
I have no name!@vpn-server:/$ whoami
whoami: cannot find name for user ID 1002
I have no name!@vpn-server:/$ cd etc
bash: cd: etc: Permission denied
I have no name!@vpn-server:/$ ls -al etc
d????????? ? ? ? ? ? .
d????????? ? ? ? ? ? ..
d????????? ? ? ? ? ? acpi
-????????? ? ? ? ? ? adduser.conf
I have no name!@vpn-server:/$ sudo su
sudo: can't open /etc/sudoers: Permission denied
© Super User or respective owner