You are not logged in.

#1 2012-12-20 01:42:26

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

[solved] Alternative to pmount?

Is there a recommended alternative to pmount? Or is the recommendation to just use the AUR package? I'm not sure how to tell what it means when a package moves to AUR. (That is, I know some possible reasons but I'm not clear how to tell which apply in a given case or what the recommended action is, if there is such a thing.)

Last edited by cfr (2013-01-05 01:39:36)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#2 2012-12-20 01:55:30

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] Alternative to pmount?

I used to use pmount as well.  I discovered that udevil is pretty much exactly what I wanted though... I guess pmount was too, but lately it was moutning everything with root permissions set, which kind of defeatet the purpose of being able to mount the thing as a user.

Offline

#3 2012-12-20 03:10:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: [solved] Alternative to pmount?

I also was a very happy pmount user who switched to udevil.  Unfortunately it seems like some of the udevil documentation is intertwined with other tools like udisks and automounting stuff* which I have no interest in, but udevil itself simply replicates what pmount used to do.

*note: I should stress the "seems like" part of that statement, as I can't say to have explored to thoroughly, but I did avoid checking out udevil for quite a while as I mistakenly believed it was one of those automouting tools.

Last edited by Trilby (2012-12-20 03:11:50)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2012-12-20 03:17:36

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [solved] Alternative to pmount?

"sudo mount" and give yourself permission to run mount and umount without a password? or just use your password? works for me.

Offline

#5 2012-12-20 04:24:33

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] Alternative to pmount?

Trilby wrote:

I also was a very happy pmount user who switched to udevil.  Unfortunately it seems like some of the udevil documentation is intertwined with other tools like udisks and automounting stuff* which I have no interest in, but udevil itself simply replicates what pmount used to do.

*note: I should stress the "seems like" part of that statement, as I can't say to have explored to thoroughly, but I did avoid checking out udevil for quite a while as I mistakenly believed it was one of those automouting tools.

^^Exactly the same situation here.  The wiki lists it as a tool to use with spacefm and udisks or some odd combination to achieve automounting.  So I skipped over it and never gave it a second thought.  Then I actually read ignorantguru's first post of his community contirbutions thread, and realized that it was exactly what I wanted.

Unfortunately, as of a few months ago, pmount mounts everything with root permissions (until you change it once), thus defeating the purpose of having user mounting capabilities. I was never able to find a solution, so I seeked out alternatives.

Offline

#6 2012-12-20 15:38:00

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [solved] Alternative to pmount?

When I've used pmount it mounts according to user that mounted it.  If you're using Gnome or Xfce4, and all the user mountable partitions are showing up on the desktop, the user can mount them there.  It shows up in /run instead of /media.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#7 2012-12-20 22:10:23

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [solved] Alternative to pmount?

pmount has been working great for me to.

I will look at udevil - I also had this down as an automounting-related tool and so didn't think of it as relevant to this problem.

Of course, I realise I can use sudo but I don't want to mount usb keys as root and pmount just did the job so easily... Anyway, off to look at udevil now!

Thanks for the suggestion - will update this when I've had a chance to investigate the possibility further.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#8 2012-12-21 02:49:25

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [solved] Alternative to pmount?

Just to clarify.

* AUR != bad.
* Pmount is a simple project whose only goal is to mount _removable_ media (by default). This means that you can't use it to unmount e.g. /var, or mount an internal partition. This is why you shouldn't use sudo with mount. The only objection against pmount is that it is SUID.
* IMHO, udevil is a completely broken idea because udev is not your toy and should not be abused for mounting. That's what udisks/mount/... is for. Besides, it is also SUID when used w/o devmon (a supervisor daemon)...


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#9 2012-12-21 13:41:27

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: [solved] Alternative to pmount?

It seems pmount was moved to aur because the developer that used and maintained it (tpowa i think) switched to something else.
It was put on an orphan list this spring, no one stepped up to take over the maintenance so it was moved to aur.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2012-12-21 16:56:48

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [solved] Alternative to pmount?

Just use udisks.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#11 2012-12-21 17:08:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: [solved] Alternative to pmount?

Mr.Elendig wrote:

Just use udisks.

??  That does automounting doesn't it?  If so it really doesn't replace pmount as it does something totally different and undesirable (for some of us).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#12 2012-12-21 17:09:04

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [solved] Alternative to pmount?

Trilby wrote:
Mr.Elendig wrote:

Just use udisks.

??  That does automounting doesn't it?  If so it really doesn't replace pmount as it does something totally different and undesirable (for some of us).

man udisks

Look at the --mount and --umount options etc.
Udisks itself doesn't do automounting, that is handled trough file managers or standalone daemons like udiskie.

Last edited by Mr.Elendig (2012-12-21 17:10:34)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#13 2012-12-21 22:36:01

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [solved] Alternative to pmount?

In looking through the configuration file for udevil, I noticed that it says

# IMPORTANT:  If an allowed file is mounted to a media directory, the user may
# be permitted to unmount its associated loop device even though internal.
# INCLUDING /MNT HERE IS NOT RECOMMENDED.  ALL ALLOWED MEDIA DIRECTORIES
# SHOULD BE OWNED AND WRITABLE ONLY BY ROOT.

I don't really understand this. How does /media differ from /mnt from a security standpoint and should all sub-directories/mount points under /mnt also be owned and writeable only by root? (I would prefer a pointer to an explanation which would enable me to understand this than an answer to this specific question but I include it for context.) This is unrelated to pmount since pmount doesn't use /mnt in any case but it has just made me think I maybe don't understand the risks of using /mnt for other things.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#14 2012-12-22 16:15:27

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [solved] Alternative to pmount?

cfr wrote:

In looking through the configuration file for udevil, I noticed that it says

# IMPORTANT:  If an allowed file is mounted to a media directory, the user may
# be permitted to unmount its associated loop device even though internal.
# INCLUDING /MNT HERE IS NOT RECOMMENDED.  ALL ALLOWED MEDIA DIRECTORIES
# SHOULD BE OWNED AND WRITABLE ONLY BY ROOT.

I don't really understand this. How does /media differ from /mnt from a security standpoint and should all sub-directories/mount points under /mnt also be owned and writeable only by root? (I would prefer a pointer to an explanation which would enable me to understand this than an answer to this specific question but I include it for context.) This is unrelated to pmount since pmount doesn't use /mnt in any case but it has just made me think I maybe don't understand the risks of using /mnt for other things.

/media's intention is for mounting user disks, but since there can be so many of them, that's where they go.
/mnt on the other hand is usually for system administration that usually only root uses to mount filesystems on. 
Somewhere along the way (about 2.2 or so) the switchover from using /mnt for external mounts changed into /media, reserving /mnt for root related tasks.  Functionally they are the same.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#15 2012-12-23 01:32:07

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [solved] Alternative to pmount?

Thanks for the info. OK. So I guess the issue would only be with ownership of /mnt and not the mount points under it (same as for /media or whatever). (And I can leave things as they are! Basically, I mount a sshfs under /mnt and an internal partition which has different group ownership and permissions at its root than standard.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#16 2012-12-23 01:40:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: [solved] Alternative to pmount?

Mr.Elendig wrote:

Udisks itself doesn't do automounting, that is handled trough file managers or standalone daemons like udiskie.

Thanks, that's another tool that needs a better press agent wink

But it seems udisks has quite a few more dependencies that udevil, including polkit which I'd rather not have.

Last edited by Trilby (2012-12-23 01:41:00)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#17 2012-12-23 13:05:39

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [solved] Alternative to pmount?

What's wrong with using polkit? It solves the permission issue in a sane way.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#18 2012-12-23 13:36:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: [solved] Alternative to pmount?

I have no intent of flaming, which is why I edited my previous post to tone it down.  But I do not want polkit on my systems, and udevil provides exactly what I need with nothing I don't.  One of my reasons is that most tools that interact with polkit lead to dozens of daemon processes starting and running indefinitely.  I don't find this acceptable.

Last edited by Trilby (2012-12-23 13:45:35)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#19 2013-01-02 00:12:34

PReP
Member
From: Sweden
Registered: 2010-06-13
Posts: 359
Website

Re: [solved] Alternative to pmount?

Is there no "Real" way of allowing users to mount devices?
what does the storage-group do nowadays?

For i single user system such as mine - i always do manual mounts with sudo, or scripts doing the same when exectued.
But for a multi-user system - do we really need to use semi-external tools for just allowing such a basic thing?


. Main: Intel Core i5 6600k @ 4.4 Ghz, 16 GB DDR4 XMP, Gefore GTX 970 (Gainward Phantom) - Arch Linux 64-Bit
. Server: Intel Core i5 2500k @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
. Body: Estrogen @ 90%, Testestorone @ 10% (Not scientific just out-of-my-guesstimate-brain)

Offline

#20 2013-01-02 00:21:04

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

Re: [solved] Alternative to pmount?

If you don't want to use a program like udevil, you can just use udisks as Mr.Elendig pointed out. You just need an active systemd session and polkit installed.

Offline

#21 2013-01-05 01:23:12

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [solved] Alternative to pmount?

So I've been trying to get udevil working and I'm obviously missing something. I installed udevil. I then altered the default config file in 2 ways. First, I uncommented the log line. Second, I added my username to restrict the users and groups who can mount stuff in this way to just me.

When it didn't initially work, I checked out the post-installation instructions again from the install file and followed up the link. Following the instructions at http://ignorantguru.github.com/udevil/#polling, I saw that it is recommended to enable kernel polling even if using udisks but I discovered that it already seems to be enabled:

$ cat /sys/module/block/parameters/events_dfl_poll_msecs 
2000

Obviously there is something else I'm meant to do but I'm finding it hard to figure out what. The wiki doesn't really say much about it and there doesn't seem to be a manual page or any further instructions on the url I listed above.

$ mount /dev/sdc1 /media/y
mount: only root can do that

Note: I don't have a /run/media directory so I'm assuming /media is the correct place - both seem to be enabled in the default configuration file and I didn't touch any of the default settings except for the two specific changes mentioned above:

$ diff -Naur /etc/udevil/udevil.conf.orig /etc/udevil/udevil.conf
--- /etc/udevil/udevil.conf.orig        2012-12-18 17:41:50.000000000 +0000
+++ /etc/udevil/udevil.conf     2012-12-31 00:23:24.805004389 +0000
@@ -22,7 +22,7 @@
 
 
 # To log all uses of udevil, set log_file to a file path:
-# log_file = /var/log/udevil.log
+log_file = /var/log/udevil.log
 
 # Approximate number of days to retain log entries (0=forever, max=60):
 log_keep_days = 10
@@ -60,7 +60,7 @@
 # allowed_users_nfs = bob
 # The root user is NOT automatically allowed to use udevil in some cases unless
 # listed here (except for unmounting anything or mounting fstab devices).
-allowed_users = *
+allowed_users = <username>
 
 
 # allowed_groups is a list of groups permitted to mount and unmount with
@@ -78,7 +78,7 @@
 # allowed_groups_nfs = network
 # The root user is NOT automatically allowed to use udevil in some cases unless
 # listed here (except for unmounting anything or mounting fstab devices).
-allowed_groups = *
+allowed_groups = <username>
 
 
 # allowed_media_dirs specifies the media directories in which user mount points

[Except that <username> is my user name which is also the name of my primary group.

Could somebody give me a hint as to what I'm missing?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#22 2013-01-05 01:33:34

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

Re: [solved] Alternative to pmount?

If you want automounting, you can just run the devmon daemon. To mount manually with udevil, you would run "udevil mount /dev/sdc1".

Offline

#23 2013-01-05 01:39:15

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [solved] Alternative to pmount?

anonymous_user wrote:

If you want automounting, you can just run the devmon daemon. To mount manually with udevil, you would run "udevil mount /dev/sdc1".

Thanks! I knew I was doing something basically idiotic.

Somehow I read "Uses mount's existing command line usage" and managed to miss the remainder of that line. Or I failed to remember it. I'm not now certain which. Pretty dumb.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB