FS#31647 - [util-linux] unhelpful error message from umount

Attached to Project: Arch Linux
Opened by Glenn (grepfor) - Saturday, 22 September 2012, 15:11 GMT
Last edited by Dave Reisner (falconindy) - Friday, 27 September 2013, 13:44 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Brief description:
When a user attempts to umount a user-mountable filesystem which is not
presently mounted, the error message emitted ("operation not permitted")
is not really informative or helpful. It should simply report that the
requested filesystem is not presently mounted, as it used to do.

Pertinent version info:
util-linux 2.21.2-5
Kernel: 3.5.3-1-ARCH #1 SMP PREEMPT

How to reproduce:
#
# fstab line for /mnt/flash (which is not presently mounted):
#
$ grep /mnt/flash /etc/fstab
/dev/hda1 /mnt/flash msdos noauto,user 0 0


#
# As non-root user, attempt to unmount it (even though it is not mounted):
#
$ umount /mnt/flash
umount: /mnt/flash/: umount failed: Operation not permitted

#
# At some time in the past, the emitted error message was more useful,
# simply reporting tha the requested filesystem is not presently mounted.
# Here's an example from an older system:
#
$ umount /mnt/xyz
umount: /mnt/xyz is not mounted (according to mtab)

Commentary:
Obviously this problem is not a national emergency, but it would be nice if
the old, more informative, behavior could be restored.
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 27 September 2013, 13:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  Committed upstream for inclusion in util-linux 2.24
Comment by Alexander F. Rødseth (xyproto) - Saturday, 22 September 2012, 18:35 GMT
Please test if util-linux from [testing] solves this problem.
Comment by Glenn (grepfor) - Saturday, 06 October 2012, 00:55 GMT
Yep. Appears to be fixed in util-linux 2.22-7. Thank you.
Comment by Glenn (grepfor) - Monday, 23 September 2013, 00:19 GMT
Problem is back in util-linux 2.23.2.

Attempting to umount a FS which is not mounted emits "operation not permitted" instead of "is not mounted". x
Comment by Dave Reisner (falconindy) - Monday, 23 September 2013, 00:21 GMT
This couldn't have come back -- it never went away. It's quite broken in 2.22 and 2.22-7 only changed the install scriptlet...
Comment by Glenn (grepfor) - Monday, 23 September 2013, 00:38 GMT
Interesting. And stumped as to why I thought it was fixed. I definitely tried it, but perhaps on a different system than I thought, don't know. My memory horizon is about 2 weeks these days, just don't recall.

Comment by Glenn (grepfor) - Tuesday, 24 September 2013, 21:13 GMT
Fwiw... a few observations. These may or may not have anything to do with why it was reported as fixed in 2.22-7:

* The original report only concerned itself with a non-root user attempting to umount a user-mountable FS which is not in fact mounted.

* In 2.23.2, the following are observed: A root user attempting to umount a non-mounted FS gets the correct "is not mounted" message. But a non-root user gets "operation not permitted", even if the FS is optioned as user-mountable.

Don't know if this was also true in 2.22-7, but suspect it was. If so, it may explain why it was reported as fixed in 2.22-7: I may have done the check as root, having forgotten that the problem pertained only to non-root user.


Comment by Karel Zak (kzak) - Friday, 27 September 2013, 08:15 GMT
Fixed in upstream tree, commit 726f9fbf46c3e0427c47e7c68c69d4ae42191b71.

Loading...