Access to floppy denied after mounted with Device Notifier

When I mount a floppy with Device Notifier, access to the floppy is denied in Dolphin, because the automatically created mount point /var/run/media/<user>/disk has ownership root and groupship root. Changing the ACL of the directory <user> does not have any effect on the ownership and groupship of the automatically created mount point disk. This happens on openSUSE 12.3. Does anybody know, how one can change this behaviour, so that it is possible to mount floppies with Device Notifier.

What if you go into YaST / Security and Users /** User and Group Management **and edit yourself, go to the Details tab and Additional Groups select **floppy **then **OK **and see if that makes any difference.

Thank You,

Sorry, but that does not help. Ownership and groupship of the automatically generated mount point is still root.

IMHO it is (and was) allways root:root. But it is bout the pertmissions. Please do not tell us your conclusions only, but allways show why you came to those conclusions. in this case a

ls -ld /var/run/media/<user>/disk

(with the correct names of course) will show us how it is. Thwen we can maybe draw our own conclusions.

And please add to this the mount information:

mount -a | grep media

pc1:/home/amadrits # ls -ld /var/run/media/amadrits/disk
drwxr-xr-x 2 root root 7168  1. Jan 1970  /var/run/media/amadrits/disk
pc1:/home/amadrits # mount -a | grep media
pc1:/home/amadrits #

I do appoligize. It should have been

mount | grep media

But whatever that will show (we need to see the uid= and gid = paramters primaraly), the ownership should indeed have been amadrits:users.

When you connect an USB stick (withe a non-Linux file system on it), do you have the same problem or not?

BTW, this could be a bug and it could be that the bug is created by the fact that floppy disks are thought to be a thing of the past. We had other reporting problems here during boot, that were eliminated by switching off the floppy in the BIOS. This signaling that not very many developers do (or even are able to) test with floppy devices.

So I dug up my old USB floppy disk drive, still containing a formatted floppy disk. It immediately mounted for me and the Notifier gave me an option to load it up in Dolphin from KDE. It came up mounted as “/var/run/media/james/2AED-CAB4/” where I found that indeed “/var/run/media/james” is owned by root, group root, but “2AED-CAB4” is owned by james, group users. That tells me that a valid partition is not being found in your case. As stated before, you may need to join the floppy group, but I am not sure about that. Do you know if the floppy disk is good and does it work in Windows or anything else?

Thank You,

I have the same problem here: if I mount the floppy using the device notifier or dolphin or udisksctl, it is mounted as root. (and yes, my user is part of the floppy group, and disk, and …)

As a workaround I have this entry for the floppy in /etc/fstab:

/dev/fd0             /media/floppy        auto       noauto,user,sync      0 0

and can mount it with “mount /dev/fd0” as user.

I also have a shortcut on my folderview, created by right-clicking on the applet and selecting “Create new”->“Link to device”->“Floppy Disk”.
You can mount and unmount then by right-clicking on this shortcut, or open (and mount) it as usual with left-click.

I will play around with udisks2 some more, and if I find a fix for this problem I’m going to post it here…:wink:

It works fine with an USB stick with fat32:

wolfi@amiga:~> ls -la /var/run/media/wolfi/Transcend/
insgesamt 16
drwx------   3 wolfi users 8192  1. Jän 1970  .
drwxr-x---+  3 root  root    60 23. Apr 01:16 ..
drwx------  18 wolfi users 8192 27. Jän 23:45 Instrumentelle Analytische Chemie Protokolle

But for a floppy with fat12 I get this:

wolfi@amiga:~> ls -la /var/run/media/wolfi/disk/
insgesamt 86
drwxr-xr-x  2 root root  3584  1. Jän 1970  .
drwxr-x---+ 4 root root    80 23. Apr 01:18 ..
-rwxr-xr-x  1 root root 83968 16. Okt 2001  slides1.ppt
amadrits@pc1:~> mount | grep media
/dev/fd0 on /run/media/amadrits/disk type vfat (rw,nosuid,nodev,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro,uhelper=udisks2)
/dev/fd0 on /var/run/media/amadrits/disk type vfat (rw,nosuid,nodev,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
amadrits@pc1:~>

When I connect an USB stick, it works. The ownership is amadrits:users.

Joining the floppy gruuop does not help. The floppies work on Windows.

So, I have formatted and copied data to my USB Floppy disk in openSUSE 12.3. Here is what it looks like in Dolphin:

http://paste.opensuse.org/view/download/38805884

The permissions for the Folder that represent the floppy disk look like this:

http://paste.opensuse.org/view/download/19274033

/var/run/media/james/ drwx------ (700) 2 james users 16384 Apr 22 19:48 MYFLOPPY

The “mount | grep media” finds this for the floppy drive on my system.

/dev/sdk on /run/media/james/MYFLOPPY type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

I do have a bash script that can format a floppy disk in openSUSE 12.3 that might be worth a try you can find here: S.U.F.F. - SuSE USB Floppy Formatter - Version 1.30 - Blogs - openSUSE Forums Thank You,

Thank you, I will be happy with the workaround.

My conclusion from the above (thank you amadrits for the mount output), that there is a bug in the usdisk2 rules that forget to mount with uid= and gid= and also forget to change the ownership of the mountpoint.

IMHO this is worth a bug report on Bugzilla at openSUSE:Submitting bug reports - openSUSE (same username/password as here on the forums).
I would be willing to do this, but I have no floppy devices, thus I am unable to report a technical sound case there. Anybody? Please report the link to the bug report here, thus others can add information to it when desired.

I found something:
Add “umask=0” to the line in /etc/fstab, so that it looks like:

/dev/fd0             /media/floppy        auto       umask=0,noauto,user,sync      0 0

Then mounting the floppy also works with udisksctl, device notifier and dolphin! :slight_smile:

Well, it is still mounted as root, but all users have write permissions now:

wolfi@amiga:~> ls -la /media/floppy/insgesamt 86
drwxrwxrwx 2 root root  3584  1. Jän 1970  .
drwxr-xr-x 3 root root    72 23. Apr 13:07 ..
-rwxrwxrwx 1 root root 83968 16. Okt 2001  slides1.ppt

I think that’s good enough…:wink:

It is still a bypass. Not a solution to the bug.

Yes, I know. And I am going to report a bug.But for now, it is good enough for me… :wink:

Oh yes, the bypass is good enough. And I hope that many people find it here. In any case, the titlle of this thread is good enough for finding this.

Here is the bugreport: https://bugs.freedesktop.org/show_bug.cgi?id=63849

I reported it upstream, as the same problem also occured with a self-compiled udisks2-2.1.0 and an Ubuntu 13.04 LiveCD.

If this is fixed, I will of course take care that the fix is released as online update for openSUSE…

Thanks a lot.