Bug 190916 - Allow non root user to remount read-only
Summary: Allow non root user to remount read-only
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-06 13:56 UTC by Kasper Dupont
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-21 14:57:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kasper Dupont 2006-05-06 13:56:45 UTC
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 13:58:12 UTC
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 14:57:49 UTC
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.