LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-06-2006, 01:17 PM   #1
sancho
Member
 
Registered: Sep 2003
Distribution: Ubuntu 9.04/9.10 (64-bit)
Posts: 149

Rep: Reputation: 15
"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?
 
Old 09-06-2006, 01:29 PM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
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"
 
Old 09-08-2006, 12:46 PM   #3
sancho
Member
 
Registered: Sep 2003
Distribution: Ubuntu 9.04/9.10 (64-bit)
Posts: 149

Original Poster
Rep: Reputation: 15
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. )

Last edited by sancho; 09-08-2006 at 12:47 PM.
 
Old 09-10-2006, 12:57 AM   #4
sancho
Member
 
Registered: Sep 2003
Distribution: Ubuntu 9.04/9.10 (64-bit)
Posts: 149

Original Poster
Rep: Reputation: 15
....anyone?
 
Old 09-27-2006, 10:17 PM   #5
dearvoid
LQ Newbie
 
Registered: Sep 2006
Location: Beijing, China
Distribution: Ubuntu
Posts: 2

Rep: Reputation: 0
My ubuntu has the same problem. This cause non-root users not able to login. Any one has any idea?
 
Old 09-28-2006, 01:48 AM   #6
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
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)
 
Old 09-28-2006, 01:54 AM   #7
dearvoid
LQ Newbie
 
Registered: Sep 2006
Location: Beijing, China
Distribution: Ubuntu
Posts: 2

Rep: Reputation: 0
yes, we can work it around by adding chmod into rc.local. but i want to know what the real reason is.
 
Old 09-28-2006, 05:26 PM   #8
sancho
Member
 
Registered: Sep 2003
Distribution: Ubuntu 9.04/9.10 (64-bit)
Posts: 149

Original Poster
Rep: Reputation: 15
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...
 
Old 09-28-2006, 07:30 PM   #9
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
Go to https://launchpad.net/distros/ubuntu/+bugs and in the top left there's a link to report a bug
 
Old 09-29-2006, 06:58 PM   #10
sancho
Member
 
Registered: Sep 2003
Distribution: Ubuntu 9.04/9.10 (64-bit)
Posts: 149

Original Poster
Rep: Reputation: 15
A bug report has been filed here .

Thanks for the link, binary_y2k2.
 
Old 10-07-2009, 11:38 PM   #11
unixbhaskar
LQ Newbie
 
Registered: Aug 2005
Location: India
Distribution: Gentoo,Arch ,Fedora,Debian
Posts: 9

Rep: Reputation: 0
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

Last edited by unixbhaskar; 10-08-2009 at 06:33 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is meant by " file > /dev/null 2>&1 </dev/null " attockonian Linux - Newbie 5 06-30-2006 10:51 PM
I've got a message about "/dev/null: access denied" Saulo SUSE / openSUSE 2 04-14-2006 10:37 AM
ssh login with normal user, receive: /dev/null: Permission denied mark78301 Red Hat 3 11-12-2005 09:20 AM
/dev/null: Permission denied phoenix7 Linux - Distributions 1 10-01-2005 06:31 PM
/dev/null: Permission denied LavaDevil94 Linux - Software 2 09-14-2004 11:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration