Score:0

An error with sudo command

in flag

I used 'chmod -7 RRR'(without quotes) from one of my project directories without any options(eg. folder name - I usually use 'chmod -R 777 storage/logs' - for getting logs written into the logs file inside lumen/laravel project).

Now whenever I use sudo command I get the result: sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin

Can someone help me in this regard?

hr flag
`chmod -7 RRR` would have removed all permission for `others` from a directory named `RRR` (if it existed). Are you sure that's what you typed?
terdon avatar
cn flag
I suspect you actually ran `chmod -R 777` and that you ran the command as root and in either the `/` or the `/etc` directory. Is that what you did?
hr flag
Hmm... doesn't chmod require at least one file operand anyhow?
waltinator avatar
it flag
`sudo chmod -R` is an obsolete and dangerous method of controlling access. Stop using it now. This isn't DOS. Learn about Linux users, groups, and permissions. You seem to have broken your system by applying your old method to system directories (maybe just `/etc`, but possibly `/`). The last time I checked, the `/` directory contained thousands of files and directories with over a dozen different permission bit values. You have set them all to `777 rwxrwxrwx`, clearing any SETUID/SETGID permission bits. Reinstall.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.