LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   "bash: /dev/null: Permission denied" on Ubuntu Login... (https://www.linuxquestions.org/questions/ubuntu-63/bash-dev-null-permission-denied-on-ubuntu-login-481000/)

sancho 09-06-2006 01:17 PM

"bash: /dev/null: Permission denied" on Ubuntu Login...
 
Hi. Subject pretty much says all--I get the following message repeated in a terminal window infinitely whenever I try to login as a normal user on my Ubuntu 6.06 box:

[...]
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
[...]

The permissions on /dev/null are indeed set to 0600 (for whatever reason) and running a "sudo chmod 666 /dev/null" rectifies this problem. However, upon rebooting, the perms on /dev/null return to 0600. I am having this problem on another one of my Ubuntu boxen and I've no clue what I did to prompt it. My only guess was a system update.

Any ideas?

Andrew Benton 09-06-2006 01:29 PM

The permissions on /dev/null should be set by udev so check the files in /etc/udev/rules.d, such as /etc/udev/rules.d/40-permissions.rules, it should have a line that says
Code:

KERNEL=="null", MODE="0666"

sancho 09-08-2006 12:46 PM

Andrew,

Hey, thanks for the response. I thought udev might have something to do with it. However, I have checked the file that you're talking about and it does indeed have that exact line that you typed.

Also, udev is set to run in the current runlevel (2) and 'ps aux|grep udev' shows that it is active as a daemon.

Hmmmm...

(Plus, I'm still kinda wondering what is causing this--this is a fresh Ubuntu install. :scratch: )

sancho 09-10-2006 12:57 AM

....anyone?

dearvoid 09-27-2006 10:17 PM

My ubuntu has the same problem. This cause non-root users not able to login. Any one has any idea?

binary_y2k2 09-28-2006 01:48 AM

as a hackish way, you can boot in to your LiveCD or recovery mode from GRUB and edit the file /etc/rc.local adding the line:
Code:

chmod 666 /dev/null
then just reboot and it should work after that.
(/etc/rc.local gets run as the last part of the boot sequence)

dearvoid 09-28-2006 01:54 AM

yes, we can work it around by adding chmod into rc.local. but i want to know what the real reason is.

sancho 09-28-2006 05:26 PM

Yeah, changing the permissions via /etc/rc.local was what I ultimately ended up doing shortly after posting the original thread. It works but, like others here, I would still like to know why this is happening in the first place. It's happened on 2 out of 3 of my Ubuntu machines (and I "treat" them all alike--I didn't do anything special to the 2 that gave me problems), and it's obviously happening to others.

I should probably file a bug report but I don't know how...

binary_y2k2 09-28-2006 07:30 PM

Go to https://launchpad.net/distros/ubuntu/+bugs and in the top left there's a link to report a bug

sancho 09-29-2006 06:58 PM

A bug report has been filed here .

Thanks for the link, binary_y2k2.

unixbhaskar 10-07-2009 11:38 PM

Tried all the mentioned method ,not working with Ubuntu Jaunty
 
As problem that bash:/dev/null:Permission denied, I have tried all the method mentioned ,but it's not allow me login from graphical login screen,And if I login from terminal got that error.

Please help. Tried to solve this problem by;

1) Remove and create /dev/null

2) set correct permission ,0666

3) write/create a file 40-persistent-rules in udev dir and put the line Kernel=Null and ...

4)put an entry in rc.local as chmod 0666 and exit 0

what else... still not able to get in. Although last time putting the value in rc.local solve this same problem.

Wondering!! Any help would be greatly appreciated.

I am using Ubuntu Jaunty 9.0.4.

Thanks
Bhaskar


All times are GMT -5. The time now is 07:22 AM.