开发者_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 questionI'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
精彩评论