Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HAL, udev, umask, USB mass storage & permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
kfiadeg
n00b
n00b


Joined: 04 May 2006
Posts: 48
Location: Republic of Poland

PostPosted: Sun Nov 29, 2009 11:47 am    Post subject: HAL, udev, umask, USB mass storage & permissions Reply with quote

Hi there. I posted the same problem on the polish forum, but since it had not been resolved yet I do duplicate it here, in english.

The problem is about system assigning user/group of root/root (with umask=002) when I connect the USB mass storage device, such as thumbdrive. HAL mounts the device in /media/ directory. Unfortunatelly, common user doesn't have permission to write on the device.

Have a look:
Code:
$ ls -al /media

drwxr-xr-x  3 root root 4096 Nov 24 14:55 .
drwxr-xr-x 21 root root 4096 Oct 31 10:55 ..
-rw-r--r--  1 root root   76 Nov 24 14:55 .hal-mtab
-rw-------  1 root root    0 Nov 24 13:32 .hal-mtab-lock
-rw-r--r--  1 root root    0 Oct 19 17:28 .keep_sys-apps_hal-0
drwxrwxr-x 17 root root 4096 Jan  1  1970 SYSRESCUE

(where the SYSRESCUE is the example pendrive)

I am a member of these groups:
Code:
wheel, audio, cdrom, video, cdrw, usb, users, haldaemon, plugdev, vboxusers


I don't know why it happens. The prettiest solution would be to have system assign group of, for example, "plugdev" or "haldaemon" to devices like USB mass storage, so I could access them as a member of that group, without restrictions.

Can you help me? ("...occupy my brain", as O. Osbourne used to sing :P )
Back to top
View user's profile Send private message
rael1986
n00b
n00b


Joined: 20 Nov 2009
Posts: 3

PostPosted: Sun Nov 29, 2009 12:45 pm    Post subject: Reply with quote

do 'ls -l /dev' and see what's the permission of the mounted media (/dev/sdx). i guess you missed disk group.
Back to top
View user's profile Send private message
kfiadeg
n00b
n00b


Joined: 04 May 2006
Posts: 48
Location: Republic of Poland

PostPosted: Sun Nov 29, 2009 5:45 pm    Post subject: Reply with quote

Hi there again and thank you for your reply! :)
So I did add myself to "disk" group, but it didn't help.
Code:
$ mount | grep SYSRESCUE
/dev/sdc1 on /media/SYSRESCUE type vfat (rw,nosuid,nodev,sync,uhelper=hal,umask=002)

Code:
$ ls -l /dev | grep sdc1
brw-rw---- 1 root  disk        8,  33 Nov 29 18:35 sdc1

Code:
$ ls -l /media
drwxrwxr-x 17 root root 4096 Jan  1  1970 SYSRESCUE

So, as you can see - /dev/sdc1 belongs to root|disk, however /media/SYSRESCUE (automounted by hal daemon) belongs to root|root and so adding myself to the "disk" group, although a good idea to try, could not help in this case :(

As I remember it worked OK for some time, but I can't recall when it changed it's behaviour - I don't plug pendrives so often...
Back to top
View user's profile Send private message
progman32
n00b
n00b


Joined: 16 Aug 2006
Posts: 50

PostPosted: Sat Jan 02, 2010 6:28 am    Post subject: Reply with quote

Bump. I have the same exact problem, and it's driving me crazy. Who sets permissions for mounted removable drives? Hal?

EDIT: Argh, I'm an idiot! I use XFCE, and it seems permissions are managed by /etc/xdg/xfce4/mount.rc, which I somehow missed when updating exo. Re-emerged exo, merged in the mount.rc with etc-update, and all is well!
Back to top
View user's profile Send private message
kfiadeg
n00b
n00b


Joined: 04 May 2006
Posts: 48
Location: Republic of Poland

PostPosted: Thu Jan 07, 2010 1:47 pm    Post subject: Reply with quote

UP! :)

I just don't get it.
I am happy (well, almost) GNOME user, and I just don't know what is going on inhere.
I have that utility called "Authorizations" under System/Preferences menu. As a root I have granted my regular user account almost all privileges: mount, unmount, reboot, poweroff... but NONE of the seem to apply anywhere.

Do I miss any packages for such a privileges control or what??
Here is a list of my current installed packages...

Please help. It is kinda annoying when I have to switch to root just to copy one file to my thumbdrive...

EDIT: OK, this is really stupid now. I have just removed myself from everywhere in the GNOME's System/Preferences/Authorizations and just changed org.freedesktop.hal.storage."Unmount file systems mounted by other users.", setting "Implicit Authorizations / Active Console" to "Yes", where previously was "Admin authentication (keep indefinitely)".
And that fixed the problem!

Any clues??
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum