Bug 190916

Summary: Allow non root user to remount read-only
Product: [Fedora] Fedora Reporter: Kasper Dupont <bugzilla>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-21 14:57:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.