Page 1 of 1
permission on /dev/null
Posted: Fri Jan 06, 2012 12:14 am
by TMDolphin
Hi guys,
since some days i've problems with permissions on /dev/null. All users other than root don't have permission to write to /dev/null.
I tried fixing the problem, by recreating /dev/null, but logging in on the next day and the same error occured again an permissions are messed up again. Does someone have an idea?
greetz TMDolphin
Re: permission on /dev/null
Posted: Fri Jan 06, 2012 3:17 am
by moredruid
can you post the output of ls -l /dev/null ?
Re: permission on /dev/null
Posted: Fri Jan 06, 2012 11:28 pm
by TMDolphin
Hey, thanks for your reply..
here is what it says..
Code: Select all
[root@Irene ~]# ls -l /dev/null
-rw------- 1 root root 1222 7. Jan 07:26 /dev/null
Re: permission on /dev/null
Posted: Sat Jan 07, 2012 7:16 pm
by radioz
That doesn't look right. Here is mine:
crw-rw-rw- 1 root root 1, 3 Dec 4 13:52 /dev/null
I would delete the /dev/null you have and create a new one:
cd /dev
sudo rm null
sudo mknod -m 660 null c 1 3
sudo chmod 666 null
Re: permission on /dev/null
Posted: Sun Jan 08, 2012 12:54 pm
by TMDolphin
i tried again, with the code you told me. it works until i reboot. after rebooting i have the same sh*** i posted already.
seems to be something in the startup procedure...
ideas what it could be?
Re: permission on /dev/null
Posted: Mon Jan 09, 2012 1:02 am
by moredruid
if there is a /var/log/boot.log, check that.
the problem is that changing permissions is usually not logged.
What you could do is change the syslog logging verbosity to "debug" but make sure you have enough space in /var/ and see if it is logged then.
you can add this to your /etc/syslog.conf:
*.debug /var/log/mylog
and reboot.
Since it pertains permissions: did you play around with SELinux settings?
The command "getenforce" should give you the SELinux status.
If it's enabled you can re-initialize SELinux by creating a file and rebooting:
touch /.autorelabel; reboot
You can do the latter part regardless of state (enabled/disabled), it should not break anything.
Good luck!
Re: permission on /dev/null
Posted: Mon Jan 09, 2012 3:43 am
by TMDolphin
Thank you very much for this detailed explanation. i will check it out and post my results.