Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 537168

Summary: emerge changes permissions of /dev/null after multiple packages merge
Product: Portage Development Reporter: William L. Thomson Jr. <wlt-ml>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge output showing change to /dev/null permissions
emerge --info

Description William L. Thomson Jr. 2015-01-20 21:36:21 UTC
This is likely specific to me, and one system. I have built others of the same base image I used for this system. I also make binaries off this system, I run on others. I cannot explain why this is happening on just this one system.

Reproducible: Always

Steps to Reproduce:
chmod 666 /dev/null
emerge more than one package
ls -l /dev/null -> crw------- 1 root root 1, 3 Jan  4 11:14 /dev/null
Comment 1 William L. Thomson Jr. 2015-01-20 21:38:45 UTC
Created attachment 394430 [details]
emerge output showing change to /dev/null permissions
Comment 2 William L. Thomson Jr. 2015-01-20 21:39:21 UTC
Created attachment 394432 [details]
emerge --info
Comment 3 William L. Thomson Jr. 2015-06-08 22:49:22 UTC
Turns out this was syslog-ng of all things. I had a rule to send some log output to /dev/null. It seems if you use this in syslog-ng you need to set permissions on /dev/null, or syslog-ng will change the permissions on /dev/null to something you do not want.

destination dev_null { file("/dev/null" perm(0666)); };

Really should be a default or something in syslog-ng, but then it would have to look out for /dev/null in any file() and adjust permissions accordingly. That might be ideal, but not sure its practical, and not making such a suggestion to upstream.