Bug 355247 - reluctant mount coreutil
Summary: reluctant mount coreutil
Status: RESOLVED WONTFIX
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: i686 SuSE Linux 10.1
: P4 - Low : Enhancement with 5 votes (vote)
Target Milestone: ---
Assignee: Matthias Koenig
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-22 11:32 UTC by Elmar Stellnberger
Modified: 2008-05-13 14:36 UTC (History)
0 users

See Also:
Found By: Community of Practice
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar Stellnberger 2008-01-22 11:32:35 UTC
user mode mounts can cause a lot of problems:

1.) remount is supposed to succeed if mount succeeds:
> mount /mnt/ram
> mount -o remount /mnt/ram
mount: Nur „root“ kann dies tun

2.) umount is refused if dev is mounted several times by user
> mount|grep ram
/dev/ram1 on /mnt/ram type ramfs (rw,noexec,nosuid,nodev)
/dev/ram1 on /mnt/ram type ramfs (rw,noexec,nosuid,nodev)
> umount /mnt/ram
umount: /mnt/ram scheint mehrfach eingehängt zu sein
> mount|grep ram
/dev/ram1 on /mnt/ram type ramfs (rw,noexec,nosuid,nodev)
/dev/ram1 on /mnt/ram type ramfs (rw,noexec,nosuid,nodev)

3.) privileges of user mount point remain reset
> ls -ld /mnt/ram
drwxrwxrwx 3 elm users 72 2007-06-05 10:39 /mnt/ram
> mount /mnt/ram
> ls -ld /mnt/ram
drwxr-xr-x 2 root users 0 2008-01-22 12:27 /mnt/ram
> chown elm:users /mnt/ram
chown: Ändern des Eigentümers von „/mnt/ram“: Die Operation ist nicht erlaubt
> sudo chown elm:users /mnt/ram
root's password:
> ls -ld /mnt/ram
drwxr-xr-x 2 elm users 0 2008-01-22 12:27 /mnt/ram
> grep ram /etc/fstab
/dev/ram1             /mnt/ram             ramfs      noauto,user       0 0

Consequently it is possible to mount /dev/ram1 as user, but not to access /dev/ram1 after mounting unless a root user resets the privileges of the mount point. That simply does not make sense. I would suggest mount to execute a chown for user mounts ('user' or 'users' mount option) on the mount point and additionally a chmod g+u for mounts with the 'users' option on the mount point.
Comment 1 Matthias Koenig 2008-05-13 14:36:48 UTC
1. Currently mount disallows remounts for user, because you are able to change options when remounting and user mounts have their options defined in fstab.
If you want to allow this you will have to keep track which options should be allowed on remount.
As such a feature would require much work, please discuss this upstream on the util-linux-ng mailing list (util-linux-ng@vger.kernel.org).

2. The issue here is that the same  device has been mounted several times on the same mount point, this is fixed in the current release of util-linux-ng.

3. The permissions of the mount point are completely irrelevant. The user/group/permissions which show up are given in the filesystem which is to be mounted. I do not think that mount should touch the filesystem via chown/chmod.