Accessing floppy by user:

Hi
I have been searching for a way to access my floppy by me the
simple user with no success. I google the subject and tried the different suggestions with again no luck.
How can i access my floppy without going su all the time I want to use my floppy.

Also i use Kjots but there seem to be a bug in it. If you try to save the info you have on it (by using the export way) it doesn’t
save to nowhere not even to the default location.

While i am at it the Kalarm also has a bug if you try to use a sound file as a wakeup call it doesn’t work at all, I only use ogg music file no mp3.

        Thanks in advance.

In KDE 3 you set up a Link to Device which leaves an icon on the Desktop. When you click on that it opens the floppy (as long as there is a disk in it)

To unmount, you right click on the icon and select ‘Unmount’

In KDE 4 you should get a notification that a Floppy drive has been detected - as far as I know, it will only be detected if there is a disk in it. Follow the instructions thereafter.

I don’t know what the equivalent is in Gnome.

My problem is not that i can’t mount the floppy it that i want to mount it as a user not as root. As root there no problem, I want to
mount it as a user me not by root. What do i have to change or fix to get control of my floppy without going the root way. There must be a way to fix this. All the howto on google does nothing to fix the issues of mounting the floppy by a simple user.

                   Again Thanks.

Ps: There must be someone out there that knows how to fix this.

I have no problem accessing floppy drives as user in either KDE3 or KDE4 - I set up the link in KDE3 but it works in KDE4. So I’m not sure why a similar approach should not work for you.

If you are running KDE, why not try KDE forums

:sarcastic:Ok can you write to floppy or mount /dev/fd0 or remove file from floppy or umount /dev/fd0 if you can do this tell me how because i tried everything. That is as a user not as root. The link you talk about if it right click on desktop and create a link to device tried it do not work. Still can’t write or mount /dev/fd0 or umount /dev/fd0 or remove file from floppy. It only tell me that only root has the right to do this. I am sorry but on this side of thing if i don’t mount the /dev/fd0 as root i cannot access the /media/floppy and see what on the floppy as a user. Also as a user i cannot write to floppy or erase floppy or format floppy i can’t do nothing. And i want to buy myself a usb key is this going to be the same hassle to write on it or erase or access it:( !!even worst will i have to be root to mount it. :\

                  Show me how Show me how.
                            Thanks.

I haven’t explored all of KDE4 but it is possible that link to device has not been implemented yet or not in the same way as under KDE3. I haven’t had a problem (I can do everything you want to do) because it was already there under KDE3.

If it hasn’t been implemented yet under KDE4, you may have to wait or install KDE3 and use that to implement it.

Alternatively, go on KDE forums and ask someone there about the situation regarding KDE4.

Based upon your post, you can access the floppy drive as su (root) and can read/write/format it. You cannot do these things as a normal user. This is a permissions problem. Most Linux distributions restrict access to the floppy drive as a security constraint.

I had similar problems with openSUSE versions 10.2 and 10.3. This is what I had to do to get around it. [Presently running 10.3]

To use a floppy with KDE 3.5 you will have to setup the link-to-device as was listed in an earlier reply. This will allow mount, unmount, file viewing, copying and format to work by clicking on the icon. Prior to openSUSE 10.3 you could access the floppy from Konqueror, but recent versions of KDE have a bug that is preventing this (see the KDE bug list at KDE.org). I do not run Gnome or KDE 4, so I cannot address what you need to do to access a floppy from these desktops. Be sure to have this link setup before proceeding. If that cannot be done, then whatever technique you are using as su to access the floppy drive can be used as a normal user to test the drive permissions.

First check the file /etc/fstab for its entries. It controls the storage devices on your computer, including the floppy drive. It will control mounting, reading, writing and sync options. The entries in fstab are well documented on the internet and in Linux books. This probably will not solve all the problems, but you need them set properly to allow read/write and user mounting. Settings for sync are debated by users for the “proper” value. Defaults usually will not allow read/write and allow only root to mount the device. Reboot the computer and test for mounting, read/write and formatting problems.

If you still have a problem in some of the operations, then the block device permissions probably are at fault. To check this, as root go to the directory /dev and find the devices (files) fd0 and fd0uxxxx where xxxx is the drive size. Using your file manager and the detailed (tree) view, look at the permissions and group. Change the permissions by selecting the filename and choosing properties > permissions. Set both read and write permissions for the group. Then look at the overall system’s users/groups by using the system>configuration>YaST administration program and be sure that your user name is a part of the group that is linked to the floppy drive. [Alternatively set read and write permissions for all Others then anyone can use the drive]. Now test for mounting, read/write and formatting problems. If you can do these operations successfully, then it is a block device permissions issue.

I will assume that you can now access the floppy successfully as a normal user. Now for the bad news. What you have just done to the block device is undone whenever you reboot. In recent openSUSE versions the device driver links for the floppy are dynamically created at startup using the udev program. Search the internet for information on this program if you wish to learn more. Since you have successfully proven that the remaining problems are block device permissions based and not something else, here is the permanent fix. This fix is based upon openSUSE 10.3, the 10.2 version is more difficult to fix due to an earlier version of udev but still repairable. Newer versions of openSUSE will use newer udev versions but still should behave similarly. As su (root) go to the directory /etc/udev/rules.d and look for a file 50-udev-default.rules. [If this file does not exist, using grep search for fd in all the rules files.] This file contains the rules that are imposed upon the devices as they are created - including access permissions and groups. Look through the file for lines similar to:

additional floppy devices (no sysfs entries)

KERNEL==“fd[0-9]", ACTION==“add”, ATTRS{cmos}=="?”, RUN+=“create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k”

The key fd[0-9]* means that this line will setup the floppy drives. The entry after the -G switch is the group that the floppy will belong to. The entry after the -M switch is the permissions for the floppy in octal notation. The second digit selects permissions for the owner, the third digit for the group and the fourth digit for all others. The numbers are read (4), write (2), and execute (1) - sum the values of the permissions set and that will be the value for the digit. You can compare this number to the permissions you saw previously when looking at the block devices using the file manager.

As written above, the owner will have read/write permissions and a group member will have read permissions. No one will have execute permissions. All others will have no access. If you want to allow all group members to have read/write access then modify the line to:
KERNEL==“fd[0-9]", ACTION==“add”, ATTRS{cmos}=="?”, RUN+=“create_floppy_devices -c -t $attr{cmos} -m %M -M 0660 -G disk $root/%k”

Similarly you can change the fourth digit to a 6 and all users can read/write to the floppy. Change the digits to a 7 and you can read/write/execute programs on the floppy (considered a security risk).

If you want to restrict access to the floppy, change the group name to a different name. Then use the YaST system administration utility for Users/Groups and individually include users in this group.

There is a second line in the rules file you should also consider modifying. Look for the line similar to:

block devices

SUBSYSTEM==“block”, GROUP=“disk”, MODE=“0640”

This rule is for other block devices created in the disk group. The MODE here can be changed to modify the permissions as desired.

Experiment as you wish. You must reboot the computer for the new settings to take effect. Combinations of these rules will change the settings for the fd0 and fd0uxxxx devices. As you experiment, be sure to check read/write access and formating. For me, the crucial test was in floppy formating. I have found that KDE 3.5 uses kfloppy and is dependent upon the permissions for the fd0uxxxx device while Gnome uses gfloppy and is dependent upon the permissions for the fd0 device. There are various permutations of these dependencies (bugs?) that I will not go into. There are also features (bugs!) in the udev implementation that can produce strange behavior. And as always, the behaviors vary per the version of Linux. Also check the permissions of other drives in your computer if you are modifying the block subsystem line. BE CAREFUL NOT TO REMOVE THE READ/WRITE OWNER PERMISSIONS of the generic block devices or you may lose the entire system - depending on your setup they could control access to the master hard drive. Just find a setup that you can live with.

If necessary, try accessing the floppy through a terminal (console) session as su and as a normal user by typing in floppy control (format, read, copy, directory) commands. If these work and you cannot access the floppy through the graphical desktop, then there is a problem in the desktop and support groups for these desktops can be consulted. Due to the growing pains in KDE4, I have not upgraded and do not know if there are problems there.

The usb devices are supposed to be setup in a similar fashion.

I hope this helps.

(Sorry for late reply just got back)Thanks dk_suse
The problem is solved must have been a bug somewere manage to get it working, also i have no problem with my usb keys.

              Once again thanks.