OpenVZ Forum



Members   Search      Help    Register    Login    Home
Home » General » Support » /dev/null permission denied
/dev/null permission denied [message #24676] Fri, 07 December 2007 11:54 Go to next message
beyondx is currently offline beyondx
Messages: 21
Registered: October 2007
Junior Member
From: 212.66.153*
Hi everyone,

I´ve got a weird problem with the NULL-Device. In fact I just virtualized a fedora3 machine, which worked quite well. Access via SSH etc. is possible. However there´s one problem with the dev/null-device. The Amavis-milter accesses the /dev/null-device combined with etc/profile, which leads to an error --> /dev/null: permission denied.
How can I solve this problem?
I already deleted dev/null and recreated it...as I already said access via ssh is possible and anything else works...except for the point mentioned above.
Any help is appreciated

Thanks,

Norman
Re: /dev/null permission denied [message #24680 is a reply to message #24676] Fri, 07 December 2007 12:54 Go to previous messageGo to next message
maratrus is currently offline maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
From: *sw.ru
Hi,

1. What kernel do you use?
2. Please look at this page may be it relates with your problem
http://forum.openvz.org/index.php?t=msg&goto=9123&&a mp;srch=%2Fdev%2Fnull+permission#msg_9123
Thank You!
Re: /dev/null permission denied [message #24697 is a reply to message #24676] Fri, 07 December 2007 16:40 Go to previous messageGo to next message
beyondx is currently offline beyondx
Messages: 21
Registered: October 2007
Junior Member
From: 212.66.153*
Thanks for your reply!
I´m using the following kernel on a fedora-core6 machine:
2.6.18-8.1.15.el5.028stab047.1 #1 SMP Tue Oct 23 15:25:33 MSD 2007 i686 i686 i386 GNU/Linux.

I will have a look at your recommended link.
Regards
Norman
Re: /dev/null permission denied [message #25628 is a reply to message #24697] Fri, 04 January 2008 07:15 Go to previous messageGo to next message
beyondx is currently offline beyondx
Messages: 21
Registered: October 2007
Junior Member
From: 212.66.153*
Hi everyone,

unfortunately I´m still having a weird problem with the dev/null-device.
As i already mentioned, I virtualized a fedora-core 3 machine running stuff like amavisd-new, spamassassin etc.
After recreating all devices and other steps mentioned in the HowTo:P2V, everything seems to work fine...the only exception I could figure out is amavisd-new.
Example:

[root@fedora3p2v /]# /etc/init.d/amavisd-new status
amavis-milter is stopped
amavisd is stopped
amavisd-new is stopped

[root@fedora3p2v /]# /etc/init.d/amavisd-new start
Starting amavis-milter: /etc/profile: line 27: /dev/null: Permission denied
/etc/profile.d/colorls.sh: line 3: /dev/null: Permission denied
/etc/profile.d/colorls.sh: line 4: /dev/null: Permission denied
/etc/profile.d/colorls.sh: line 17: /dev/null: Permission denied
/etc/profile.d/colorls.sh: line 18: /dev/null: Permission denied
/etc/profile.d/colorls.sh: line 19: /dev/null: Permission denied
/etc/profile.d/colorls.sh: line 20: /dev/null: Permission denied
/etc/profile.d/vim.sh: line 3: /dev/null: Permission denied
-bash: /dev/null: Permission denied
[ OK ]
Starting amavisd-new: [ OK ]

Does anyone know how to fix that problem? I Already upgraded to the latest openvzkernel:2.6.18-53.el5.028stab051.1

Greetings

Norman
Re: /dev/null permission denied [message #25637 is a reply to message #25628] Fri, 04 January 2008 15:24 Go to previous messageGo to next message
maratrus is currently offline maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
From: *si-chelny.ru
Hi,

can you please attach the strace output of /etc/init.d/amavisd-new start and also ls -l of /vz/private/<ID>/dev and /vz/root/<ID>/dev?
Re: /dev/null permission denied [message #25639 is a reply to message #25637] Sat, 05 January 2008 03:38 Go to previous messageGo to next message
vaverin is currently offline vaverin
Messages: 626
Registered: September 2005
Senior Member
From: *rev.domonet.ru
Could you please show 'ls -al /dev/null' output?
Re: /dev/null permission denied [message #25668 is a reply to message #24676] Sun, 06 January 2008 12:06 Go to previous messageGo to next message
beyondx is currently offline beyondx
Messages: 21
Registered: October 2007
Junior Member
From: *dip.t-dialin.net
Hi everyone,

thanks for your participation in this weird problem. Luckily I could already figure it out myself by having a closer look at the bug report 398.

There you find the following line to set up the rights for the devices such as dev/null

vzctl set <id> --devices c:5:2:rw --save

This setup helped and actually solved the problem.

Before using this command I followed the Howto:"physical to VE", which suggests:

rm -f /vz/private/123/dev/null (if null exists)
mknod /vz/private/123/dev/null c 1 3

This command set the permissions crw-r--r--, which lead to the conflict.

Maybe someone could add this to the wiki.

Greetings,

Norman

PS: Sorry, if this solutions was more than obvious to some of you...I´m still a linux noob :-/
Re: /dev/null permission denied [message #25669 is a reply to message #25639] Sun, 06 January 2008 12:07 Go to previous messageGo to next message
beyondx is currently offline beyondx
Messages: 21
Registered: October 2007
Junior Member
From: *dip.t-dialin.net
Hi everyone,

thanks for your participation in this weird problem. Luckily I could already figure it out myself by having a closer look at the bug report 398.

There you find the following line to set up the rights for the devices such as dev/null

vzctl set <id> --devices c:5:2:rw --save

This setup helped and actually solved the problem.

Before using this command I followed the Howto:"physical to VE", which suggests:

rm -f /vz/private/123/dev/null (if null exists)
mknod /vz/private/123/dev/null c 1 3

This command set the permissions crw-r--r--, which lead to the conflict.

Maybe someone could add this to the wiki.

Greetings,

Norman

PS: Sorry, if this solutions was more than obvious to some of you...I´m still a linux noob :-/
Re: /dev/null permission denied [message #25730 is a reply to message #25669] Tue, 08 January 2008 06:00 Go to previous messageGo to next message
maratrus is currently offline maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
From: *sw.ru
Hi,

1. Can you please start your VPS and show the output 'cat /proc/mounts' from HN?
2. And please output of 'umask' from HN?

Thank You!
Re: /dev/null permission denied [message #25786 is a reply to message #25669] Wed, 09 January 2008 01:57 Go to previous messageGo to next message
vaverin is currently offline vaverin
Messages: 626
Registered: September 2005
Senior Member
From: *sw.ru
I would note that 'vzctl set --devices c:5:2:rw' command is not required.
First, it is not /dev/null device, it is /dev/ptmx
Second, this device file should have 0666 access permissions too. Obviously you have created it by mknod command, and write permission for user and group was restricted by umask.

Marat has corrected our wiki page, now it recommend to execute mknod with --mode option.

Thank you,
Vasily Averin

Re: /dev/null permission denied [message #46404 is a reply to message #25786] Thu, 17 May 2012 08:51 Go to previous message
iroen is currently offline iroen
Messages: 1
Registered: March 2012
Location: Poland
Junior Member
From: *au.poznan.pl
I had this problem today and this link (I can't use links so sorry, but I wont show you the source ...) solution helped. By default there was "crw" only on the /dev/null and the problem (in this case the starting of allegrograph server) went away after doing chmod 0666 on the file.
Previous Topic:"Holy crap" in kernel.log when using vzctl chkpnt xxx --dump
Next Topic:Crossover Cable Connected, now what?
Goto Forum:
  


Current Time: Sun May 26 03:51:40 EDT 2013
Powered by FUDforum Powered by Parallels Virtuozzo Containers