Bug 190916 - Allow non root user to remount read-only
Allow non root user to remount read-only
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-06 09:56 EDT by Kasper Dupont
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-21 10:57:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kasper Dupont 2006-05-06 09:56:45 EDT
Description of problem:
Non root users cannot remount a file system read-only

Version-Release number of selected component (if applicable):
util-linux-2.12p-9.14

How reproducible:
Always

Steps to Reproduce:
1. mount /media/usbdisk1
2. mount -o remount,ro /media/usbdisk1
  
Actual results:
mount: only root can do that

Expected results:
File system is actually remounted read-only

Additional info:
For a file system which fstab allows the user to mount read-write and unmount,
there seems to be no good reason for dissallowing remounting read-only or
read-write at any time.

Currently "mount --ro /media/usbdisk1" and "mount -r /media/usbdisk1" works as
expected "mount -o ro /media/usbdisk1" does not eventhough the man page say they
are synonymous.
Comment 1 Kasper Dupont 2006-05-06 09:58:12 EDT
This entry should have been marked as a feature-request, for some reason
bugzilla does not seem to allow that anymore.
Comment 2 Karel Zak 2006-08-21 10:57:49 EDT
There's security reason (don't forget we're taking about sbit util). The mount
for non-roots is very limited. You cannot specify (=overwrite fstab) options
like -t, -w, -o, -n, -a, ... You have to follow fstab setting only. And it
doesn't check for -o arguments -- forbidden is arbitrary -o argument. Maybe this
solution is too hard from your point of view, but it's safe and very robust
solution.

Note You need to log in before you can comment on or make changes to this bug.