Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
works. Why not as normal user? Pipes are fine, it's character and block specials that are problematic.
(To explain a bit: I'm copying the guts of iso files into ordinary directories for analysis, so I don't have to mount them everytime I need to take a peek, and I run into this on every dev directory, and also some lib dirs that have char nodes 'null', and a few other odd places. So the copy operation has to be done as root even though everything is owned by me as regular user.)
Distribution: Mainly Devuan with some Tiny Core, Fatdog, Haiku, & BSD thrown in.
Posts: 5,012
Rep:
I guess if an ordinary user could delete your disk node you wouldn't be very happy.
There are certain things (& programs) that are the preserve of 'root' to prevent an 'unhappy' user from damaging your system.
Copying a device node requires creating a new one that happens to be the same as the source. Allowing a non-root user to create a device node would be a huge security hole since you could gain access to any device just by creating a device node that gave you the needed permissions. Even if the special case of copying a device node were allowed, that would still be a security issue since that node would give you permissions that the system could not later remove, such as happens with the various device nodes that are owned by the currently logged-in user.
Incidentally, that's why automatically mounted external devices always get the "nodev" option, among other restrictions.
Copying a device node requires creating a new one that happens to be the same as the source. Allowing a non-root user to create a device node would be a huge security hole since you could gain access to any device just by creating a device node that gave you the needed permissions. Even if the special case of copying a device node were allowed, that would still be a security issue since that node would give you permissions that the system could not later remove, such as happens with the various device nodes that are owned by the currently logged-in user.
Incidentally, that's why automatically mounted external devices always get the "nodev" option, among other restrictions.
That makes sense. I'm not a paranoid individual by nature, so I tend to keep my security somewhere between 'lax' and 'sloppy', kinda like "The key is under the mat."
That also explains why pipes are OK but char and block specials are not.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.