Bug 129935 - mounting removables by a non-root user fails
mounting removables by a non-root user fails
Product: Fedora
Classification: Fedora
Component: pam (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Depends On:
Blocks: FC3Target
  Show dependency treegraph
Reported: 2004-08-14 14:42 EDT by Michal Jaegermann
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-11 10:20:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2004-08-14 14:42:03 EDT
Description of problem:

Not entirely sure if pam is really the culprit here but it owns
all relevant config files.  Still the recent kudzu-1.1.79-1 may
be involved here.  I do not know when this really started.

With the only one active login on the whole machine, i.e. me,
I get:

$ mount /mnt/cdrom/
mount: only root can mount /dev/cdrom on /mnt/cdrom

A corresponding line in /etc/fstab has these in options field:

    udf,iso9660 noauto,owner,kudzu,ro

After changing "owner" to "user" there are no problem with
mounting cdrom from a non-root account but the former used to
work just fine and in some setups may make a difference.

The same goes for floppy (and even if I can mount /dev/floppy
then 'mdir a:' gives "Can't open /dev/fd0: Permission denied").

It should be noted that even if "owner" is used and
'mount /mnt/cdrom' does work then 'strace mount /mnt/cdrom'
ends up with 'write(2, "mount: must be superuser to use "...'
but this can be a property of strace.

Version-Release number of selected component (if applicable):

How reproducible:
Comment 1 Tomas Mraz 2004-09-13 08:04:14 EDT
I can't reproduce this bug with pam-0.77-55

If you look at those devices (/dev/fd0, /dev/hd? which is the cdrom
device), are you owner of them if you are logged on the console?

What is the contents of the /var/run/console directory?
Comment 2 Michal Jaegermann 2004-09-13 12:40:08 EDT
I would be much happier to know what really caused the problem
and which changes made it to vanish but indeed with my current
test setup "owner" in /etc/fstab is sufficient.

Many things were modified in the meantime but yes - a month ago
I was an owner of devices in question, IIRC, and this still was
of no use.

On the first attempt to mount a CD by a non-root I got though
"/mnt/cdrom already mounted or a wrong file system" but I could
not repeat that after a subsequent mount by root or after a reboot.
A hiccup in a driver?  Maybe; although I tried that a few times
before an attempt from a root account, and results were the same,
so it does not sound like timing.  Still I do not know how to
reproduce that.

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