when I log into Centos 6.5 server with root details, It is not showing # in my terminal, when I do sudo it says

"sudo: /etc/sudoers.d is world writable"

So i checked on google and used answers of below link but did not help.


Later I checked other files and directories, all the files/folders are writable by everyone? is that causing problem?

How can I fix that.

  • 2
    someone has really messed up your system. it's essentially unfixable. backup your data and re-install from scratch. and be more careful with sudo chmod in future.
    – cas
    Oct 16, 2015 at 6:57
  • any chance to fix it without reinstalling? Oct 16, 2015 at 7:06
  • If you can somehow acquire a list of what each individual file's permissions are supposed to be...then maybe. Possibly by examining the contents of every rpm package installed (but even then that would only fix the perms for files belonging to packages). And you'd never be sure that you fixed every file or directory. So, nope. backing up your important data and reinstalling from scratch is your best option.
    – cas
    Oct 16, 2015 at 7:11
  • The value of $PS1 is normal?
    – phk
    Oct 16, 2015 at 7:19
  • $PS1 value is : [root@ ~]$echo $PS1 give [\u@\h \w]$ Oct 16, 2015 at 8:01


You must log in to answer this question.

Browse other questions tagged .