Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/dev/null permission keeps changing.
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
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Fri Aug 29, 2014 9:22 am    Post subject: /dev/null permission keeps changing. Reply with quote

Hi Experts, I recently upgraded the udev from 212-r1 to sys-fs/udev-215-r1. Now what is happening that the permission for /dev/null keeps changing.

Quote:
# ls -lth /dev/null
crw------- 1 root root 1, 3 Aug 26 15:52 /dev/null


I manually change it to 666, but again after some time if I try to emerge some package like octave, the permission is reverted back to 600. I am not sure how to get this fixed.

Appreciate all your help.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Fri Aug 29, 2014 9:59 am    Post subject: Reply with quote

[edit] I just deleted my post, because I don't know which thread of yours to answer.
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Fri Aug 29, 2014 10:15 am    Post subject: Reply with quote

Do I have multiple threads for this ? please point me so that I could mark one as duplicate and close it.

As per your previous post, you mentioned to compare 215 and 215-r1, what exactly do I need to compare between the 2 ?

Under /lib/udev/rules.d, do I need to modify some settings to make the permission value for /dev/null permanent ?

Appreciate all your help.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Fri Aug 29, 2014 10:49 am    Post subject: Reply with quote

manu_leo wrote:
Under /lib/udev/rules.d, do I need to modify some settings to make the permission value for /dev/null permanent ?

@manu, nothing you have to do normally.

What about you kernel .config, did it change:
[/code]zcat /proc/config.gz |grep DEVTMPFS
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y[/code]

@manu, you could try the udev version before the revision to check if a Gentoo bug.
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Fri Aug 29, 2014 10:54 am    Post subject: Reply with quote

Thanks for your time and help. Here is my o/p


Quote:
uname -a
Linux Maxwell 3.14.14-gentoo #5 SMP Tue Aug 26 04:38:37 2014 x86_64 Intel(R) Xeon(R) CPU X5690 @ 3.47GHz GenuineIntel GNU/Linux



Quote:
# grep DEVTMPFS /usr/src/linux/.config
CONFIG_DEVTMPFS=y
# CONFIG_DEVTMPFS_MOUNT is not set
Maxwell newdata #



# CONFIG_DEVTMPFS_MOUNT is not set'' is commented out. Do I need to uncomment it and change its value to 'y' and them build the kernel again ?

I dint get the last part as I am not sure how to check that

Quote:
@manu, you could try the udev version before the revision to check if a Gentoo bug.


Thanks for all the help again.
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Fri Aug 29, 2014 12:21 pm    Post subject: Reply with quote

Any help on this would be greatly appreciated. This is really messing up permission things with other applications.

Thanks for all the help in advance.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Fri Aug 29, 2014 12:44 pm    Post subject: Reply with quote

When I had this problem it was a cron script, either recoll or mandb, that somehow overwrote /dev/null. Probably a different script in your case, but it might be where to start looking.

Good luck - Will
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Fri Aug 29, 2014 12:44 pm    Post subject: Reply with quote

It looks like the ebuild changed from

212-r1
Code:
    cat <<-EOF > "${T}"/40-gentoo.rules
    # Gentoo specific usb group
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
    # Keep this for Linux 2.6.32 kernels with incomplete devtmpfs support because
    # accept4() function is supported for some arch's wrt #457868
    SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666"
    EOF


to

215-r1
Code:
    cat <<-EOF > "${T}"/40-gentoo.rules
    # Gentoo specific floppy and usb groups
    SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
    EOF


Edit to add: I think that DEVTMPFS should be taking care of that though it may need the mount option.

What does "mount | grep devtmpfs" return
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland


Last edited by Anon-E-moose on Fri Aug 29, 2014 1:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Fri Aug 29, 2014 1:02 pm    Post subject: Reply with quote

Yes , I did upgraded from 212-r to 215-r AND after that the permission issue with /dev/null started to happen.

It's a new box with no cron tab or scripts running on it. Now if I try to open git and try to commit something, it comes up with permission denied and then I have to do
Quote:
chmod 777 /dev/null
and it starts to work..


How can this be fixed.

Appreciate all your help.
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Fri Aug 29, 2014 1:58 pm    Post subject: Reply with quote

Hi Anon, sorry missed your requested o/p. here it is

Quote:
# mount | grep devtmpfs
devtmpfs on /dev type devtmpfs (rw,relatime,size=49503464k,nr_inodes=12375866,mode=755)


please let me know if any other info is required from my end.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Aug 29, 2014 2:13 pm    Post subject: Reply with quote

Quote:
# CONFIG_DEVTMPFS_MOUNT is not set'' is commented out. Do I need to uncomment it and change its value to 'y' and them build the kernel again ?


You could, but you don't usually do that because it's easy to break your configuration with this. Note that that way you can't be sure how this will affect other options that might depend on the one you are changing.

You usually use make menuconfig (or the genkernel equivalent, no idea about that), search for the option in the menu and the save, recompile, and reinstall the kernel.
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Fri Aug 29, 2014 2:34 pm    Post subject: Reply with quote

Thanks i92guboj for looking into this.

Could you help me with which option do I need to search in the make menuconfig and then compile to get this issue fixed.

Appreciate all your help.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Aug 29, 2014 2:52 pm    Post subject: Reply with quote

Well, note that I have no idea if that will solve your problem, but the option that Anon-E-moose spoke of above is the one under device drivers -> generic driver ops. Once there, select the option for devtmpfs, and then select also the option to automount it.

Then just compile your kernel. The usual linux way is "make && make install", you might also need to update your boot loader (or not).

If you use genkernel, then I have no idea what the straight way to do it is.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sat Aug 30, 2014 5:01 am    Post subject: Reply with quote

manu_leo wrote:
Quote:
# mount | grep devtmpfs
devtmpfs on /dev type devtmpfs (rw,relatime,size=49503464k,nr_inodes=12375866,mode=755)

Anons test was the better: It shows your system somewhere takes care to mount /dev. Thus the auto-mount option of the kernel is not needed. But it wouldn't hurt either to set this.
I see 49Gbyte reserved for the dev-temporary filesystem, this indicates to me there is something missing which sets sane defaults.
@Manu, an easily to take step for you is to just try a previous version of a software. This way you can find new bugs.
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Sat Aug 30, 2014 5:26 am    Post subject: Reply with quote

Thanks all for your valuable feedback.

I tried to downgrade the udev version from 215-r to 212, but was not able to find the package for it. If you please guide me with the download and steps, that would be truly great.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sat Aug 30, 2014 7:40 am    Post subject: Reply with quote

gentoolkit has eshowkw to see the version available.try
udev-215
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Sat Aug 30, 2014 10:04 am    Post subject: Reply with quote

manu_leo wrote:
Thanks all for your valuable feedback.

I tried to downgrade the udev version from 215-r to 212, but was not able to find the package for it. If you please guide me with the download and steps, that would be truly great.


Probably because it's 212-r1 not 212

BTW I gave you the answer above for fixing 215-r1

They removed this line
SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666"
from 40-gentoo.rules

Edit to add: To see all possible versions available use "equery l -po udev"
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Sat Aug 30, 2014 5:22 pm    Post subject: Reply with quote

Hi Anon and everyone for looking into it, Appreciate all your time and help.

Anon, sorry I missed your suggestion again. So under ' /etc/udev/rules.d' , I have no rules

Quote:
cd /etc/udev/rules.d/
Maxwell rules.d # ls
Maxwell rules.d #



Its all empty. I restarted my server hoping that would make a difference but no go.


Quote:
* Searching for udev ...
[--O] [ ~] sys-fs/udev-189:0
[--O] [ ~] sys-fs/udev-190:0
[--O] [ ~] sys-fs/udev-195:0
[-P-] [ ] sys-fs/udev-208-r1:0
[-P-] [ ] sys-fs/udev-212-r1:0
[-P-] [ ~] sys-fs/udev-214:0
[-P-] [ ] sys-fs/udev-215:0
[IP-] [ ] sys-fs/udev-215-r1:0
[--O] [ -] sys-fs/udev-9999:0
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Sat Aug 30, 2014 5:32 pm    Post subject: Reply with quote

/lib/udev/rules.d/40-gentoo.rules
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Sat Aug 30, 2014 5:47 pm    Post subject: Reply with quote

My bad, I was looking into the wrong directory. I added the line into the correct file as

Quote:
cat /lib/udev/rules.d/40-gentoo.rules
# Gentoo specific floppy and usb groups
SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666"


But the error still comes when I try to switch to some other user account using 'su - ' .

For the changes which I made , do I need to restart some service for it to take effect ? Should I try to restart the server ?
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