[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Changing floppy0 ownership

On Sat, Jun 03, 2006 at 05:18:41 -0400, Chris Walters wrote:
> Florian Kulzer wrote:
> >I don't remember if you mentioned it in your original message: Can you
> >actually write to the floppy if you are root? It might be that mount
> >detects some error/inconsistency in the file system, which would cause
> >it to mount read-only. If even root cannot write to the device it might
> >help to use the "debug" option to find out what is going on, or to try
> >"vfat" instead of "msdos". 
> >
> >If root can write on the floppy then there is a permissions problem for
> >user george. Next thing to check are the permissions of the mount point:
> >
> >ls -ld /media/{,floppy0}
> >
> >(Both before and after you mount the device)
> >
> >I would also try to add the "debug" option to the /etc/fstab entry and
> >check out what the messages are when you mount as user george. (Just
> >"mount /dev/fd0" without any further options given on the command line,
> >and no "sudo".)
> Hi,
> I am having similar problems to George's.  I checked the mount point 
> both before and after I mounted the floppy, and found the access to be 
> root root. I used su to change the group of my mount point "/floppy" in 
> this case.
> This brings me to another problem:  The system will not let me, as a 
> user, mount or umount anything - it says:
> mount: must be superuser to use mount

In your other mail you posted two lines from fstab which did not contain
the "noauto" option. This means that the devices will be mounted during
boot by a root-level process. This will probably interfere with
subsequent mounting by normal users or by the automount daemon. Run
"mount" without any arguments to check if the devices are already
mounted. If so, unmount them as root and try again as a normal user.

Another thing to check is if mount and umount are setuid root:

$ ls -l /bin/{,u}mount
-rwsr-xr-x 1 root root 75532 2006-05-16 02:20 /bin/mount
-rwsr-xr-x 1 root root 57064 2006-05-16 02:20 /bin/umount

> So when I used su to mount the floppy, the mount point reverted to the 
> group root, so I changed it back to floppy, and exited.  Then I tried to 
> write a file to the floppy, and still got an access denied.  By the way, 
> the root has never had any problems writing to the floppy (or my usbdrive).
> Sorry to break into your conversation here, but I thought that since I 
> am having a very similar problem, it would be better than starting a new 
> thread.

If you use many different types of removable media, the package "pmount"
might be worth a look. It eliminates the need to write all those fstab
entries. Together with udev, hal and dbus it can also be integrated into
various desktop environments. (An icon pops up on the desktop when you
plug in a USB stick, the device is mounted and opened in a file manager
as soon as you click on the icon; a media player is started when you
insert an audio CD, etc.) I use this combination on KDE instead of
automounting and I am very happy with how it works.


Reply to: