SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm not an expert, but I wrote some udev rules a couple of weeks ago.
I think man udev gives some critical information that's not in the document you cited.
There are two sets of udev rules. The default set of rules is in /lib/udev/rules.d/. The custom rule set is in /etc/udev/rules.d/.
If your custom udev rules seem to have no effect, maybe your custom rules are failing to override the default udev rules in /lib/udev/rules.d/.
For example, the floppy devices fd* are created in /lib/udev/rules.d/50-udev-default-rules. In order to override those rules, your custom rules file would need to be in /etc/udev/rules.d/ 50-udev-default-rules.
Anyway, take a look at the man page for udev and see if you are properly taking into account the existence of the default rules already in /lib/udev/rules.d/.
Last edited by DavidHindman; 02-19-2009 at 12:40 AM.
Reason: Correct an error
I'm not absolutely sure, but I think your problem is that the underlying device node has not the permissions you want. It probably won't help to create just a symlink with other permissions if the real node has other ones.
That said I guess you have to change udev's default rules. Mine (Slackware 12.1) are in /etc/udev/rules.d/50-udev-default.rules, yours should AFAIK be in /lib/udev/rules.d if you are running Slackware 12.2. Look there for the floppy and sd* node creation and change it to your needs ... (to make a copy of this file first is a good idea)
...What I have made so far (in /etc/udev/rules.d/98-local-rules) is the following...
For the version of udev on Slack 12.2, a rule file must end with the extension .rules
That is, for my version of udev, the file "98-local-rules" would have to be named "98-local-rules.rules", else it would have no effect.
I took your floppy rule and put it into my /etc/udev/rules.d/98-local-rules.rules. I also changed it to generate devices named /dev/xfd* instead of /dev/fd*, so I could isolate the effect of your new rule. It sort of worked, giving the 666 permissions you intended. The device name came out as /dev/xfd/0 instead of /dev/xfd0, but it's close!
But so far this seems to have had no effect on the 'real world' /read/write/execute permissions and ownerships of these devices.
/dev/sda1 on /media/512_Cruzer type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower)
ls -l /dev/sda1
brwxrwxrwx 1 user plugdev 8, 1 2009-02-23 13:25 /dev/sda1
ls -l /media/512_Cruzer
-rwxr-xr-x 1 user root 5619080 2009-02-16 13:38 Opera_963_en_Setup.exe
As you can see from the above code, the /dev's are now getting the correct permissions that I have set, but their corresponding /media mountpoints still retain the original permissions (which are no good).
Can anyone offer a suggestion as to how I can make a systemwide policy of making these user (vfat) floppy and USB mountpoints automatically default to rwx for all users?
(Please don't mention fstab as I need this to be done automatically via UDEV/HAL/DBUS? as devices are inserted by the user; without requiring user intervention, or (su)root access editing).
p.s. I'm currently working on a Slackware 12.0.0 system, but would like to migrate this (rule/policy?) [once I get it working] to multiple Slackware 12.1.0 and Slackware 12.2.0 systems.