开发者

I can't change or add anything, sudo not working...sudo: can't open /etc/sudoers: Permission denied [closed]

开发者 https://www.devze.com 2023-02-21 20:52 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
开发者_JS百科

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Closed 9 years ago.

Improve this question

I'm trying to install Ruby on Rails and I was using SSH to login to the linux machine, when I started working, everything was fine and I'm sure there was a mistake I made where the file/directory permissions changed.

Now when I try to send a command like:

sudo apt-get install rubygems

I get this error:

sudo: can't open /etc/sudoers: Permission denied

Not sure what to do next, what options do I have. I can login as root user as well but I don't want to dig a deeper hole for myself.

The linux machine is running on Ubuntu 10.04.


Try this:

chmod -R 0440 /etc/sudoers.d

may be you changed the permissions by mistake.


Have you checked whether the file /etc/sudoers exists or whether the permissions have changes ?

This question may be better suited to the Linux/Ubuntu (or whatever flavour of Linux you have).

See: https://stackoverflow.com/questions/tagged/ubuntu

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号