Re: [LAD] OT: mkdosfs as normal user

From: Joern Nettingsmeier <nettings@email-addr-hidden-hochschule.de>
Date: Mon Nov 17 2008 - 18:55:11 EET

Patrick Shirkey wrote:
> Patrick Shirkey wrote:
>> On Tue, 2008-11-11 at 23:30 -0600, David M. Creswick wrote:
>>
>>> On Tue, 11 Nov 2008 09:53:17 +0700
>>> Patrick Shirkey <pshirkey@email-addr-hidden> wrote:
>>>
>>>
>>>> Joern Nettingsmeier wrote:
>>>>
>>>>> Patrick Shirkey wrote:
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I can't find anything online that gives me a way to run /sbin/mkdosfs as
>>>>>> a normal user.
>>>>>>
>>>>>> Is it just that I need to add the user to the mkdosfs group or something
>>>>>> similar?
>>>>>>
>>>>>>
>>>>> are you sure the program itself prevents that? my guess is it's the
>>>>> device you want to create the file on.
>>>>>
>>>>> should be a matter of creating a new group disk_removable or something,
>>>>> writing an udev rule to give it r/w access to all floppies and usb
>>>>> sticks and add yourself to that group.
>>>>>
>>>>>
>>>>>
>>>> Thanks for the tip.
>>>>
>>>> I'm working on it now.
>>>>
>>>> However this seems like a major oversight from a Linux on the desktop
>>>> perspective that you need to be root user to format a removable disk. It
>>>> would make sense that Nautilus or Konqueror would have built in support
>>>> by now.
>>>>
>>>> Does anyone have experience with any distros/apps allowing this as
>>>> normal user?
>>>>
>>>> It seems like it should be a no brainer.
>>>>
>>>>
>>> I think Joern is correct in that all you need is read+write permissions
>>> on the device node. Under debian etch, the group is set to "floppy" for
>>> device nodes of removable usb storage devices. I imagine other distros
>>> do something similar. So the user should just have to be a member of
>>> the floppy (or equivalent) group to run mkdosfs on the device.
>>>
>>>
>>>
>> Thanks for the tip. I ran this command:
>>
>> /usr/sbin/usermod -a -G floppy username
>>
>> On Fedora9 at least the floppy group does not control removeable disks.
>>
>> I also tried the disk group but nothing...
>>
>> Any other suggestions?
>>
> The solution appears to have been to reboot because now I can run
> mkdosfs as normal user.

after rule changes to udev, a "udevcontrol reload_config" will do the
trick.
whenever you have changed your user credentials (new group etc.), you
will have to log out and back in again to get the benefit.

in the old days, reboots used to be necessary to add new hardware, but
since we now do cpu and ram hotswap, the only excuse for a cold restart
i could think of would be a change of power supply... ;)
/me runs

best,

jörn

-- 
jörn nettingsmeier
home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621
Kurt is up in Heaven now.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Wed Nov 19 00:15:02 2008

This archive was generated by hypermail 2.1.8 : Wed Nov 19 2008 - 00:15:03 EET