You are not logged in.

#76 2012-08-16 17:51:34

bobpaul
Member
Registered: 2012-02-11
Posts: 26

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

CIFS and SMBFS are not working for me.

$ udevil mount //storagez/installers -t smbfs
udevil: denied 73: fstype 'smbfs' is not an allowed type

$ udevil mount //storagez/installers
udevil: denied 73: fstype 'cifs' is not an allowed type

Edit: Nevermind, I'm dumb. Found /etc/udevil/udevil.conf and configured it.

Last edited by bobpaul (2012-08-16 17:54:25)

Offline

#77 2012-08-16 19:19:20

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

I think it's a bit strange that there's a "default_options" in the udevil.conf, but also in the devmon executable. Shouldn't devmon get these options from the config file? The thing is, I prefer to use relatime rather than noatime, so I have to modify /usr/bin/devmon after every update.

Offline

#78 2012-08-19 16:38:58

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Army wrote:

I think it's a bit strange that there's a "default_options" in the udevil.conf, but also in the devmon executable. Shouldn't devmon get these options from the config file? The thing is, I prefer to use relatime rather than noatime, so I have to modify /usr/bin/devmon after every update.

devmon does not read udevil.conf.  The default options in devmon determine what options it passes to udevil or udisks when mounting a device (regardless of whether the mount solution in use is udevil or udisks).  Instead of editing the script, you can pass devmon --mount-options "noexec,nosuid,nodev,relatime" when invoking it, or even --mount-options "" if you just want udevil's defaults.

The default options configured in udevil.conf are always passed to mount before any options specified on udevil's command line (which can thus override them, if permitted).

devmon is usually run as a normal user, so the default options you set are what the user would like to add as mount options.  udevil runs mount as root, so udevil.conf determines what options are added by default (regardless of what the user also specifies), system-wide.

Just remember that udevil.conf determines what all users on the system can do, and what options are added when they mount via udevil, regardless of how udevil is run.  devmon's mount options determine only what options are passed to udevil or udisks when devmon mounts something.  (Because pmount cannot accept standard mount options, nothing is passed if pmount is used with devmon.)

Offline

#79 2012-08-19 18:56:27

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Oh, ok, seems like I misunderstood it completely. Thanks for explaining!

edit: By the way, running devmon automatically mounts usb devices on plugin, also cdroms etc. without kernel polling and without udisks. The Readme indicates that this isn't supposed to work, but it seems like it does work here...

Last edited by Army (2012-08-19 19:20:28)

Offline

#80 2012-08-19 20:01:38

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Army wrote:

By the way, running devmon automatically mounts usb devices on plugin, also cdroms etc. without kernel polling and without udisks. The Readme indicates that this isn't supposed to work, but it seems like it does work here...

Ok.  If you don't have udisks running and you don't have kernel polling enabled, new devices will be detected but when you insert a CD it may not detect that event.  This can vary with hardware.  If it detects what you want, no need to enable kernel polling (but no harm in doing so either).  Hopefully distros will start enabling this by default soon anyway.

Offline

#81 2012-08-19 21:14:40

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

IgnorantGuru wrote:

If it detects what you want, no need to enable kernel polling (but no harm in doing so either).

Actually when I enabled polling for one day my laptop hung up on me 3 times this day, it didn't before and after I enabled polling. But that's not something that should be discussed here wink

Offline

#82 2012-08-19 23:41:48

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Army wrote:

Actually when I enabled polling for one day my laptop hung up on me 3 times this day, it didn't before and after I enabled polling. But that's not something that should be discussed here wink

Not likely a problem in udevil itself, but I like to know the results.  This is the first I've heard of such a problem, if in fact the polling triggered the hangs.

Offline

#83 2012-08-20 00:07:20

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Army wrote:
IgnorantGuru wrote:

If it detects what you want, no need to enable kernel polling (but no harm in doing so either).

Actually when I enabled polling for one day my laptop hung up on me 3 times this day, it didn't before and after I enabled polling. But that's not something that should be discussed here wink

Are you using the Arch default kernel? Doesn't it have polling enabled?

Offline

#84 2012-09-02 16:27:46

xorgx3
Member
From: Poland
Registered: 2011-11-29
Posts: 197

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Unmounting not working for me. I use spaceFM + udevil since today. Internal devices cannot be unmounted, this is error:

udevil: denied 88: device /dev/sda2 is an internal device and you're not root

Any possibilities to fix this? I read some documentation but I didn't found nothing about them.

EDIT:
After reboot I can't mounts internal devices too.

EDIT2:
OK, i was fixed it alone.

Last edited by xorgx3 (2012-09-02 19:11:57)

Offline

#85 2012-09-02 20:10:30

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

xorgx3 wrote:

Unmounting not working for me. I use spaceFM + udevil since today. Internal devices cannot be unmounted, this is error:

udevil: denied 88: device /dev/sda2 is an internal device and you're not root

Glad you got it working.  To clarify, udevil doesn't normally allow non-root users to mount or unmount internal devices as this can create security problems.  If you do want to allow this, you can add the device to allowed_internal_devices or allowed_internal_uuids in /etc/udevil/udevil.conf.

Offline

#86 2012-09-16 14:06:52

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

If i mount a smb share with udevil, files with spaces in filename cant be processed. Known bug?
(Using smb://host/share in spacefm)

Last edited by Rasi (2012-09-16 14:09:04)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#87 2012-09-16 21:51:02

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Rasi wrote:

If i mount a smb share with udevil, files with spaces in filename cant be processed. Known bug?
(Using smb://host/share in spacefm)

I haven't received any other reports of this.  I don't have a samba server to test on atm but you might see if it's related to what mount options you are or aren't using relative to how the server is setup (eg utf8, etc).  Nothing in udevil handles this directly - it's all done through mount, so mount options are the likely way to correct it.  Can't be more specific because I don't use samba much but if no one here has further input I can pass this along to the person who did most of udevil's smb testing.

Offline

#88 2012-09-17 07:28:33

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

IgnorantGuru wrote:
Rasi wrote:

If i mount a smb share with udevil, files with spaces in filename cant be processed. Known bug?
(Using smb://host/share in spacefm)

I haven't received any other reports of this.  I don't have a samba server to test on atm but you might see if it's related to what mount options you are or aren't using relative to how the server is setup (eg utf8, etc).  Nothing in udevil handles this directly - it's all done through mount, so mount options are the likely way to correct it.  Can't be more specific because I don't use samba much but if no one here has further input I can pass this along to the person who did most of udevil's smb testing.

hmm got, it, it logged in as guest, altho my samba server has this disabled. Should check my samba config again.

Last edited by Rasi (2012-09-17 07:36:21)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#89 2012-09-17 12:42:38

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Rasi wrote:

hmm got, it, it logged in as guest, altho my samba server has this disabled. Should check my samba config again.

Okay - iirc if no username is specified with smb, first udevil will attempt to login as guest, and if that fails, will try the current $USER.  You can see these attempts by adding a --verbose   And you can add an explicit username with smb://username@host/share

Also, default mount options are set in /etc/udevil/udevil.conf

Offline

#90 2012-11-22 23:41:24

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Looks like theres plans to move /media from the filesystem package to udisks:

https://mailman.archlinux.org/pipermail … 24081.html

After this change, will udevil start defaulting to /run/media/$USER or will the udevil package provide the /media folder too?

Offline

#91 2012-11-23 01:19:06

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

anonymous_user wrote:

Looks like theres plans to move /media from the filesystem package to udisks:

https://mailman.archlinux.org/pipermail … 24081.html

After this change, will udevil start defaulting to /run/media/$USER or will the udevil package provide the /media folder too?

Whether the Arch udevil package provides /media would be up to the packager - Bartłomiej Piotrowski  If /media isn't present then udevil uses /run/media/$USER.  Or you can change this in udevil.conf, but in no case will udevil automatically create /media.  It will create /run/media/$USER on demand.

So by not providing /media, udevil will mount in the same place as udisks, which may be desirable for consistency.  If you want to avoid /run/media, you can just create /media and udevil will use it.

Offline

#92 2012-11-28 20:25:31

Lockheed
Member
Registered: 2010-03-16
Posts: 1,512

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

If I am using udevil/devmon, can I simply uninstall udisks and udisks2?
Will it not break those?

:: gvfs: requires udisks2
:: kdelibs: requires udisks
:: traydevice: requires udisks

Offline

#93 2012-11-28 22:41:27

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

To uninstall a package, you also need to remove the packages that depend on it. Also its not like udevil and udisks(2) conflict with each other. You can have all three installed.

Offline

#94 2012-11-29 16:06:17

Honaht
Member
From: El verano de los vientos
Registered: 2012-01-14
Posts: 5

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

del

Last edited by Honaht (2012-11-30 18:36:11)

Offline

#95 2012-11-30 20:12:52

Honaht
Member
From: El verano de los vientos
Registered: 2012-01-14
Posts: 5

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

USB flash drive/SD-cards mounted with root privileges. All the rest (external hard drives) - with the user privileges. FS - ext4. In what could be the reason?

Last edited by Honaht (2012-11-30 20:14:02)

Offline

#96 2012-12-16 14:40:07

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

A routine review of security policies in udevil has been conducted, and several changes were made to harden udevil against known mount helper exploits.  Although nothing terribly exciting turned up, upgrading is recommended for a few enhancements, and you can read the details.

Also, more eyes on udevil's code and behavior are always welcome - help me to keep udevil as secure as possible.  If you conduct a review and have any concerns or questions please contact me - thanks.

Offline

#97 2012-12-16 14:48:58

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Honaht wrote:

USB flash drive/SD-cards mounted with root privileges. All the rest (external hard drives) - with the user privileges. FS - ext4. In what could be the reason?

udevil is mount front-end, so devices are mounted as root.  Since ext4 supports Linux file permissions, the ownership of the files will be dependent on how they are set in the filesystem being mounted.  You can further control ownership based on mount options with some filesystems (eg uid=$UID) - not sure about ext4.  To add custom options just for ext4, add a line like this to udevil.conf:

default_options_ext4 = nosuid, noexec, nodev, noatime, ...

Also note the mount_point_mode or mount_point_mode_ext4 settings in udevil.conf which controls permissions on the mount point directory.   You and others are welcome to submit recommendations for the default udevil.conf concerning ext4 if you think they should be adjusted.

Offline

#98 2012-12-23 17:22:55

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Hi IgnorantGuru,

I've installed udevil on my file server with devmon for automounting.
My external HD mount and umount fine in /media.

Problem: /media is sharing over nfs and I haven't permission access mount point in /media over nfs network.
- I've same uid between PC,
- HD is mounting with right user,
- when I kill devmon and use 'udevil mount' command can't access over nfs.
- when I kill devmon and use 'mount' command all work fine over nfs.

Don't know where I'm wrong.

edit: precisions

Last edited by mentat (2012-12-23 17:24:00)

Offline

#99 2012-12-23 20:28:14

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

mentat:  The filesystem type you're mounting may have default options that are affecting the permissions, so you should set default_options_TYPE in udevil.conf to control permissions.  The options needed or accepted (fmask, dmask, uid ,gid, etc) will vary with filesystem type.

Last edited by IgnorantGuru (2012-12-23 20:30:43)

Offline

#100 2012-12-23 20:41:27

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

Re: udevil - mount without password, monitor udev [SpaceFM, devmon, CLI]

Thanks for reply .
Yes I've checking conf, it's ntfs filesystem:

default_options_ntfs      = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, utf8

It's seem correct, because user is good as if I mount it with 'mount' command.
I'll try with 'allow_other' option maybe.

Offline

Board footer

Powered by FluxBB