View previous topic :: View next topic |
Author |
Message |
salmonix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 16 Jul 2006 Posts: 410
|
Posted: Tue Sep 08, 2009 10:08 am Post subject: udev - mount question [solved] |
|
|
Hi there,
maybe silly question but... I have an udev rule to create a /dev symlink and set ownership for a particular
pendrive. Now, I would like to allow owner to mount that nod in his home. Unfortunately mount /dev/oldpendrive
/home/salmonix/pendrive does not work - permission denied, saying:
Quote: |
salmonix@darkstar ~ $ mount /dev/oldpendrive pendrive/
mount: permission denied. (are you root?) |
The udev rule:
Quote: |
KERNEL=="sdb" SUBSYSTEM=="block" SUBSYSTEMS=="usb" ATTRS{serial}=="106C113C3AED89A5" OWNER="salmonix" SYMLINK+="oldpendrive" |
It works - permissions for the /dev symlink:
Quote: | getfacl: Removing leading '/' from absolute path names
# file: dev/oldpendrive
# owner: salmonix
# group: disk
user::rw-
group::r--
other::--- |
Where I'd like to end up is to add a RUN+="somescript" rule to the rule created and that script would mount the device in the owner's home somewhere with r/w permissions, of course. But for the time if owner can mount the device does is. _________________ Quis custodiet ipsos, custodes?
Last edited by salmonix on Sat Sep 12, 2009 6:54 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
vad3r Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_darth_vader.gif)
Joined: 02 May 2004 Posts: 461 Location: Munich, Germany
|
Posted: Wed Sep 09, 2009 4:42 pm Post subject: |
|
|
You have to add your device and mount path to /etc/fstab. Specify the option "user" and non-root users can mount it. _________________ -- http://www.linuxaddicted.de/ | Please help to answer open questions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
salmonix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 16 Jul 2006 Posts: 410
|
Posted: Thu Sep 10, 2009 6:47 am Post subject: |
|
|
It does not work - I have tried it. (Or missed sq...)
in fstab:
Quote: | /dev/oldpendrive /home/salmonix/pendrive auto rw,user,noauto 0 0 |
But:
Quote: |
salmonix@darkstar ~ $ mount /dev/oldpendrive pendrive/
mount: permission denied. (are you root?)
salmonix@darkstar ~ $
|
_________________ Quis custodiet ipsos, custodes? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
vad3r Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_darth_vader.gif)
Joined: 02 May 2004 Posts: 461 Location: Munich, Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
salmonix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 16 Jul 2006 Posts: 410
|
Posted: Thu Sep 10, 2009 11:48 am Post subject: |
|
|
Nop.
Variants:
Quote: | salmonix@darkstar ~ $ mount /dev/oldpendrive
mount: permission denied. (are you root?)
salmonix@darkstar ~ $ mount /home/salmonix/pendrive/
mount: permission denied. (are you root?)
salmonix@darkstar ~ $ mount /dev/oldpendrive /home/s
salmonix/ syncpkgd/
salmonix@darkstar ~ $ mount /dev/oldpendrive /home/salmonix/pendrive/
mount: permission denied. (are you root?)
salmonix@darkstar ~ $
|
_________________ Quis custodiet ipsos, custodes? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
vad3r Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_darth_vader.gif)
Joined: 02 May 2004 Posts: 461 Location: Munich, Germany
|
Posted: Thu Sep 10, 2009 12:12 pm Post subject: |
|
|
Strange. The only thing else i can think of are permission problems on your device. Should be sufficient as far as i see but try to be a little more restrictive (group +w, ...) _________________ -- http://www.linuxaddicted.de/ | Please help to answer open questions |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
salmonix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 16 Jul 2006 Posts: 410
|
Posted: Fri Sep 11, 2009 7:44 am Post subject: |
|
|
Maybe devil inside...
I have changed fstab entry putting the 'owner' option in the line instead of users. Nop.
Strange, mount has these permissions:
Quote: | salmonix@darkstar ~ $ getfacl /bin/mount
getfacl: Removing leading '/' from absolute path names
# file: bin/mount
# owner: root
# group: root
user::rwx
group::--x
other::--x
|
I have checked if busybox aliases act behind the scenes - but not. _________________ Quis custodiet ipsos, custodes? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
salmonix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 16 Jul 2006 Posts: 410
|
Posted: Sat Sep 12, 2009 6:53 am Post subject: |
|
|
Yeah, detail. I had to sync the permissions in fstab (adding owner option) and the device file permissions.
Those mismatched and escaped my attention.
I have realized that the settings work the next start of the box. _________________ Quis custodiet ipsos, custodes? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|