# udev - mount question [solved]

## salmonix

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
> ...

 

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.

----------

## vad3r

You have to add your device and mount path to /etc/fstab. Specify the option "user" and non-root users can mount it.

----------

## salmonix

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?)
> ...

 

----------

## vad3r

Wrong mount command. Try this:

```
mount /home/salmonix/pendrive
```

----------

## salmonix

Nop.

Variants:

 *Quote:*   

> salmonix@darkstar ~ $ mount /dev/oldpendrive 
> 
> mount: permission denied. (are you root?)
> 
> salmonix@darkstar ~ $ mount /home/salmonix/pendrive/
> ...

 

----------

## vad3r

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, ...)

----------

## salmonix

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
> ...

 

I have checked if busybox aliases act behind the scenes - but not.

----------

## salmonix

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.

----------

