[ale] CF card permissions in Kubuntu
John Mills
johnmills at speakeasy.net
Thu Nov 2 13:27:55 EST 2006
Dale -
I'm not running *ubuntu, but in case the issue is default permissions in
udev, I attach a solution I got from another ALEer. I just dug it out
again to remind me when I hit the same problem with /dev/ttyS* in
SuSE-10.1.
HTH.
- Mills
On Thu, 2 Nov 2006, Dale Heatherington wrote:
>
> I've changed my OS from Suse 9.2 to Kubuntu 6.06. When I insert a CF card it
> automounts and the permissions on all the files defaults to 700 . With Suse
> it was 755.
>
> I'd like to change the default file permissions for USB flash drives.
> However, these automount and are not in /etc/fstab . The drives appear
> in /media/sda1. I assume there is a config file somewhere that sets the
> permissions. Does anyone know how to change them?
On Tue, 29 Nov 2005, Jason Day wrote:
>
> Date: Tue, 29 Nov 2005 13:32:47 -0500
> From: Jason Day <jasonday at worldnet.att.net>
> Reply-To: Atlanta Linux Enthusiasts <ale at ale.org>
> To: Atlanta Linux Enthusiasts <ale at ale.org>
> Subject: Re: [ale] Q: How do I make permissions on /dev/* 'sticky'?
>
> On Tue, Nov 29, 2005 at 09:09:06AM -0500, Mills, John M. wrote:
> > I notice that access permissions of '/dev/*' devices are reset to
> > defaults when my systems reboot, losing access for ordinary users where
> > I may have set it manually (i.e., /dev/ttyS* for 'minicom', etc). I
> > conjecture this is an effect ("feature"?) of the '/dev' filesystem since
> > such permission changes used to be persistent, but that's only a guess.
>
> Assuming you're using a somewhat recent distribution and 2.6 kernel,
> it's udev that's the culprit here. Udev uses a series of rules files to
> control how the device nodes are created. The default rules are in
> /etc/udev/rules.d/50-udev.rules, but you should not edit this file
> directly, since an update to udev would wipe out your changes. Instead,
> create a new rules file in /etc/udev/rules.d named 10-local.rules and
> customize that one.
>
> > Q1: How can I define these permissions so they receive my new settings
> > on reboot, instead of the system defaults?
>
> To fix the perms on the ttyS* device, for example, look for the rule in
> 50-udev.rules, copy it to 10-local.rules, and modify the permissions.
>
> For example, the ttyS line in my 50-udev.rules looks like this:
>
> # tty devices
> KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="tty"
>
> So, if I wanted ttyS* to have permissions 0666, I would add the
> following line to my 10-local.rules file:
>
> KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="tty",
> MODE="0666"
>
> Note that that should be one line.
>
> > Q2: How can I add new devices to those created on reboot? I could add
> > 'mknod' lines to rc.local, or similar, but is there a less "clunky" way
> > to do it?
>
> Just add a rule for them :)
>
> Here is a good primer for udev rules:
>
> http://www.reactivated.net/writing_udev_rules.html
>
> HTH,
> Jason
> --
> Jason Day jasonday at
> http://jasonday.home.att.net worldnet dot att dot net
>
> "Of course I'm paranoid, everyone is trying to kill me."
> -- Weyoun-6, Star Trek: Deep Space 9
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
> [ Note: This message contains email list management information ]
>
More information about the Ale
mailing list