Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Permission Denied on /dev/null ? [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
coffeekid
n00b
n00b


Joined: 03 Jun 2004
Posts: 49
Location: Salt Lake City, UT

PostPosted: Thu Mar 31, 2005 3:07 am    Post subject: Permission Denied on /dev/null ? [SOLVED] Reply with quote

On a new system build, while emerging kde, i get the following error when emerging xorg.

Code:

/usr/portage/eclass/x11.eclass: line 27: /dev/null: Permission denied


anyone else seen this problem? How could root not have permission to /dev/null ??

I searched on the forums, and found some common issues using udev (which i am using) but no solution that fixes this.

Thanks in advance.


Last edited by coffeekid on Fri Apr 01, 2005 6:21 am; edited 1 time in total
Back to top
View user's profile Send private message
coffeekid
n00b
n00b


Joined: 03 Jun 2004
Posts: 49
Location: Salt Lake City, UT

PostPosted: Thu Mar 31, 2005 8:23 am    Post subject: Reply with quote

Just a quick update..

I attempted to chmod 666 /dev/null and moved a little further in the install, but still seem to be having the same problem later. Is there some settings in my /etc/init.d/rc file that needs to be fixed? Here's the output of that:

Code:

# /etc/conf.d/rc:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/rc,v 1.13 2004/02/26 18:01:29 azarah Exp $

#
# Global config file for the Gentoo RC System
#
# NOTE: most of these are not in use yet!!
#

RC_DEVICES="udev"

# This is the amount of tty's used in most of the rc-scripts (like
# consolefont, numlock, etc

RC_TTY_NUMBER=11

# Set to "yes" if you want the rc system to try and start services
# in parallel for slight speed improvement.

RC_PARALLEL_STARTUP="no"

# Set to "yes" if the default behaviour of at least one net.*
# service starting beside net.lo is NOT enouth to consider
# the 'net' dependency up and running.

RC_NET_STRICT_CHECKING="no"

# Set to "yes" if you want to save /dev to a tarball on shutdown
# and restore it on startup.  This is useful if you have a lot of
# custom device nodes that udev do not handle/know about.
# (ONLY used by UDEV enabled systems!)

RC_DEVICE_TARBALL="no"

# Set to "yes" if you want devfsd to start upon bootup.  This is
# the default for Gentoo.
# Set to "no" only if you understand the full implications.  A
# number of files may need to be altered (i.e. /etc/inittab,
# /etc/fstab, etc.).
# Also note that it does _NOT_ start for UDEV enabled systems,
# even if RC_DEVFSD_STARTUP="yes" ...

RC_DEVFSD_STARTUP="yes"

# Set to "yes" if stop-daemon() should always retry killing the
# service if it fails the first time.

RC_RETRY_KILL="yes"


# Set the amount of seconds stop-daemon() should wait between
# retries.  $RC_RETRY_KILL should be set to "yes".

RC_RETRY_TIMEOUT=1


# Set the amount of times stop-daemon() should try to kill
# a service before giving up.  $RC_RETRY_KILL should be set to "yes".

RC_RETRY_COUNT=5


# Set to "yes" if stop-daemon() should fail if the service
# is marked as started, but not actually running on stop.

RC_FAIL_ON_ZOMBIE="no"



#
# Internal configuration variables
#
# NB:  These are for advanced users, and you should really
#      know what you are doing before changing them!
#

 
# rc-scripts dep-cache directory
#
# NOTE:  Do not remove the next line, as its needed by the baselayout ebuild!
#
#  svcdir="/var/lib/init.d"

svcdir="/var/lib/init.d"


# Should we mount $svcdir as a tmpfs or ramfs for some speed
# increase for slower machines, or for the more extreme setups ?

svcmount="no"


# FS type that should be used for $svcdir.  Note that you need
# $svcmount above set to "yes" for this to work ...  Currently
# "tmpfs" and "ramfs" are supported, with "tmpfs" the default.

svcfstype="tmpfs"


# Size of $svcdir in KB

svcsize=2048


The install menthod i used is here Bob P's great HOW-TO here: Stage 1/3 Installation - Gentoo 2005.0 & GCC 3.4.3

not 100% sure this is a udev issue, just kinda throwing this out there, since this seems to be a whole system permission screw up.

Thanks for any comments/help.
Back to top
View user's profile Send private message
d4rkn0va
n00b
n00b


Joined: 07 Jan 2005
Posts: 22

PostPosted: Thu Mar 31, 2005 4:57 pm    Post subject: Reply with quote

Similar problem here, but my installation (1on3, 2005.0) went fine and I can log in via root - instead my regular user-account doesn't have permissions for /dev/null.

Resulting problems are e.g. pypanel stops working, a/xterms won't show under X, console login works despite the "/dev/null: Permission denied" message.

Any ideas?

Edit: Forgot to mention, udev-version is 056, never had problems with 048 (before reinstall).
_________________
AMD AthlonXP 3000+ @ 2,4GHz | 1 GB DDR-RAM | 2x160GB Samsung SATA (SoftRAID0)
=> gentoo 2.6.14-r1 | gcc-4.0.1 | gnome-2.12 [ stage 1 on 3 ]
Back to top
View user's profile Send private message
d4rkn0va
n00b
n00b


Joined: 07 Jan 2005
Posts: 22

PostPosted: Thu Mar 31, 2005 5:35 pm    Post subject: Reply with quote

Followed some hints, checked /etc/udev/permissions.d/50-udev.permissions for /dev/null:

Code:
null:root:root:0666


Seems just fine, but /dev/null is still set to 0660 on startup.
_________________
AMD AthlonXP 3000+ @ 2,4GHz | 1 GB DDR-RAM | 2x160GB Samsung SATA (SoftRAID0)
=> gentoo 2.6.14-r1 | gcc-4.0.1 | gnome-2.12 [ stage 1 on 3 ]
Back to top
View user's profile Send private message
coffeekid
n00b
n00b


Joined: 03 Jun 2004
Posts: 49
Location: Salt Lake City, UT

PostPosted: Fri Apr 01, 2005 6:20 am    Post subject: Solution: Reply with quote

doing what d4rkn0va did and the following worked for me (found this on the gentoo IRC channel).

edit /etc/udev/rules.d/50-udev.rules

add the line
Code:

KERNEL="null",          NAME="%k",      MODE="0666"


That seemed to fix the problem at startup as well, i don't know why this line was missing, as it's obviously important.

Thanks for all your help! Hope this helps you guys as well.
Back to top
View user's profile Send private message
d4rkn0va
n00b
n00b


Joined: 07 Jan 2005
Posts: 22

PostPosted: Fri Apr 01, 2005 5:09 pm    Post subject: Reply with quote

Maybe this line is only required in the most up-to-date version of udev..?

But why is nobody else having these problems?

Nevermind, hope it works now..
_________________
AMD AthlonXP 3000+ @ 2,4GHz | 1 GB DDR-RAM | 2x160GB Samsung SATA (SoftRAID0)
=> gentoo 2.6.14-r1 | gcc-4.0.1 | gnome-2.12 [ stage 1 on 3 ]
Back to top
View user's profile Send private message
Sade
Guru
Guru


Joined: 22 Mar 2005
Posts: 406
Location: Netherlands - Eindhoven

PostPosted: Mon Apr 11, 2005 5:55 pm    Post subject: Reply with quote

I too used Bob_p's 2005.0 1on3 install, and got the permission denied as a user, not as root.

fixed the problem using both d4rkn0va's and coffeekid's methods.
_________________
| 1.6Ghz atom N270 | adopt an unanswerd post | a nice way to post a config file |
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Mon Apr 11, 2005 9:34 pm    Post subject: Reply with quote

i have all these :

Code:
# memory devices
KERNEL="random",  NAME="%k", MODE="0666"
KERNEL="urandom", NAME="%k", MODE="0444"
KERNEL="mem",   NAME="%k", MODE="0640"
KERNEL="kmem",    NAME="%k", MODE="0640"
KERNEL="port",    NAME="%k", MODE="0640"
KERNEL="full",    NAME="%k", MODE="0666"
KERNEL="null",    NAME="%k", MODE="0666"
KERNEL="zero",    NAME="%k", MODE="0666"


If you dont have "null" do you have any of these?
8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Sade
Guru
Guru


Joined: 22 Mar 2005
Posts: 406
Location: Netherlands - Eindhoven

PostPosted: Wed Apr 13, 2005 10:00 am    Post subject: Reply with quote

i've read this Udev Priver that i found at the bottom of the gentoo udev guide
And it states clearly that u should edit the /etc/udev/rules.d/10-local.rules
And NOT edit the /etc/udev/rules.d/50-udev.rules.

the results are the same, but the 50-udev.rules are not meant to be edited.
_________________
| 1.6Ghz atom N270 | adopt an unanswerd post | a nice way to post a config file |
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Thu Apr 14, 2005 5:22 am    Post subject: Reply with quote

The problem is not udev. This is a known Gentoo gcc / binutils bug that has been solved in gcc-3.4.3.20050110-r2.
/usr/portage/sys-devel/gcc/ChangeLog wrote:
Code:
*gcc-3.4.3.20050110-r2 (08 Apr 2005)

  08 Apr 2005; Mike Frysinger <vapier@gentoo.org>
  +gcc-3.4.3.20050110-r2.ebuild:
  Add fix for PR/16625 from upstream #88022 by Ed Catmur. Patch to prevent
  /dev/null from being deleted #79836 by David Wood.
For more info see https://bugs.gentoo.org/show_bug.cgi?id=79836.
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Fri May 13, 2005 10:43 pm    Post subject: Reply with quote

https://bugs.gentoo.org/show_bug.cgi?id=92333

now this is wierd. i just "upgraded" my stable branch box to udev-056 and as soon as i ran dispatch-conf, i started having the permission errors at logon, such as the infamous "-bash: /dev/null: Permission denied."

fwiw, there were no changes applied to the toolchain.

interestingly, the problem appears to have disappeared after a reboot. (!) :?
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum