setting write permissions for floppy

Asked by Lorenzo Tom James

I can mount my floppy but it only reads,how might I set it to write as well?

Thank you

Question information

Language:
Italian (Italy) Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
Lorenzo Tom James
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

run:

sudo mkdir /media/floppy; gksudo gedit /etc/fstab

add the line:

/dev/fd0 /media/floppy auto rw,user,noauto,exec,utf8 0 0

Save the new file and close gedit, then run:

gksudo gedit /etc/modules

and add the word:

floppy

To the end. Save the file and close gedit. You should now have write access. You MUST remember to unmount the floppy before removing

Revision history for this message
Lorenzo Tom James (jameslorenzo913) said :
#2

After doing all the commands,I tried copying over a odt.file and got(error opening file '/media/floppy0/odt.permission denied.Incidentally,the flop file was already in place when I got there.However,when ,modules came up the word floppy was not there......so I added it.

Revision history for this message
Lorenzo Tom James (jameslorenzo913) said :
#3

lorenzo@lorenzo-OptiPlex-GX620:~$ sudo mkdir /media/floppy; gksudo gedit /etc/fstab
[sudo] password for lorenzo:
mkdir: cannot create directory `/media/floppy': File exists

(gedit:5978): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.918AWV': No such file or directory

(gedit:5978): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:5978): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.SK8MWV': No such file or directory

(gedit:5978): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
lorenzo@lorenzo-OptiPlex-GX620:~$ gksudo gedit /etc/modules

(gedit:5995): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.JN0CWV': No such file or directory

(gedit:5995): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:5995): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.UPQNWV': No such file or directory

(gedit:5995): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
lorenzo@lorenzo-OptiPlex-GX620:~$
Once I was able to mount in10.4,there was never a problem reading or writing.I hope this output will be of some help.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

The first command actionparsnip asked you to run should have opened up a text editor where you can edit the file /etc/fstab. Did that not occur?

Revision history for this message
Lorenzo Tom James (jameslorenzo913) said :
#5

Yes that did occur ,but please note,that particular directory already existed.

Revision history for this message
Lorenzo Tom James (jameslorenzo913) said :
#6

I also would like to add,based on the terminal output it did in fact tried to set the permissions but failed.It seems to me,it's a matter of why?Either some kind of BUG exists or I have failed to do this properly.It's certainly not the hardware because it works excellent under windows..

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#7

"Yes that did occur"

Did you then modify the file, as actionparsnip described? Is your original problem now solved?

"but please note,that particular directory already existed."

That's not a problem. The purpose of the first part of the command ("sudo mkdir /media/floppy") was to ensure that it exists, not to ensure that it was newly created.

"based on the terminal output it did in fact tried to set the permissions but failed."

The terminal output you saw had absolutely nothing to do with the problem of making it possible to write to floppy disks. The filename "/root/.local/share/recently-used.xbel" has nothing to do with the floppy disk or the file you are editing.

The text editor cannot write to that file because it does not exist. So it tries to create it, but it cannot create it because the directory /root/.local/share does not exist. When running as a real human user, that file typically exists or can be created (the location /home/$USERNAME/.local/share exists, where $USERNAME represents the user's username), and it stores a list of recently opened files for the user's convenience. The root user's home directory (which is just /root, not /home/root) doesn't contain the same directory structure that real human users' home directories contain, and therefore does not accommodate that file.

"Either some kind of BUG exists or I have failed to do this properly."

I am not sure I am recalling correctly, but I seem to remember that some people think, or have at one point thought, that the display of those messages constitutes a bug. I think that was a minority position which is widely not adopted, but I could be remembering wrongly. If you're interested in this topic, which I again emphasize has nothing at all to do with being able to write to floppy disks (and which happens no matter *what* file you open with "gksu gedit" or "gksudo gedit"), you may want to post a new question about it (https://answers.launchpad.net/ubuntu/+source/gedit/+addquestion). If you post a link here to the new question, I'll make sure to subscribe to it, and it look into the matter and provide you with information as best I can, unless someone else gets around to doing so first (which is somewhat likely, and one of the reasons it's better for you to start a new question about that separate topic, rather than having us continue discussing it here -- please do feel free to reply here, though, if you need clarification about anything I'm saying).

Anyway, that does not in any way interfere with opening a file, editing it, and saving it. Unless you have reason to believe otherwise, that operation probably succeeded. After rebooting, are you able to easily write to floppy disks now?

Revision history for this message
Lorenzo Tom James (jameslorenzo913) said :
#8

First of all,I would like to thank you for giving your time to shed light on these matters.

Yes,I did modify the file as instructed.
No,the problem still exist.

What I can't seem to wrap my head around is if I issue a specific command(sudo mkdir/media/floppy)to do a certain task,why would(root/.local/share/recently-used.xbel)even enter the process,especially since it does not have anything to do with writing to the floppy.That confuses me.

As for posting a new question,it's forth coming....soon as I figure out exactly what I would like to ask that would best fit what I don't know and/or understand.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#9

Sorry, I should have been clearer--did you modify *both* files as instructed? Did you try rebooting afterwards (this should not be strictly necessary, but may help.)

If so, then perhaps the problem is that while any user can mount the floppy, and while the floppy can be mounted for both read and write access, the default permissions for files on the floppy are such that only root has the ability to do so. To test for this, put a floppy disk in the drive, mount it (if it doesn't mount automatically), and open a new Terminal window and run these seven commands, one after the other:

cat /etc/fstab
cat /etc/modules
mount
touch /media/floppy/blank-test-file-1
sudo touch /media/floppy/blank-test-file-2
ls -ld /media/floppy
ls -l /media/floppy

On the fifth command (which begins with "sudo") you may be prompted for your password in the Terminal. As you enter it, you won't see any placeholder characters (like *) like you do when entering your password in a graphical window. That's OK--just type it in and press enter.

I'll post again shortly to answer your request for clarification regarding the messages you see when you run "gksudo gedit".

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#10

> What I can't seem to wrap my head around is if I issue a
> specific command(sudo mkdir/media/floppy)to do a certain
> task,why would(root/.local/share/recently-used.xbel)even
> enter the process,especially since it does not have anything
> to do with writing to the floppy.That confuses me.

The command "sudo mkdir /media/floppy; gksudo gedit /etc/fstab" is really two commands. The first command creates the directory /media/floppy if it doesn't already exist; the second command runs gedit as root to edit the file /etc/fstab. It's the second command that produces the warning messages. And they are not error messages--they are warning messages. They are not actually indicating that anything is *wrong*. (Sometimes a warning does reveal a real problem, but this is not one of those cases.)

I recently posted a differently worded and differently structured explanation of what's going on with the warning messages about recently-used.xbel in another question. I think that explanation is better and clearer than the one I provided you. You can read it at https://answers.launchpad.net/ubuntu/+source/linux/+question/160070 (post #12 -- you can start in the middle of the post, with the paragraph that begins "Files specific to a particular user"). If it still doesn't make sense, please feel free to post again to request further clarification, with specific inquiries, or to ask for a more broken-down explanation.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#11

I apologize for any typographic or other errors in my most recent message (and also for accidentally submitting it as a request for information--the post preceding it was such a request, but the most recent post before this one was more properly a comment). This is because Launchpad is going down for maintenance for a short time soon, and I wanted to get the information out to you before then.

Revision history for this message
Lorenzo Tom James (jameslorenzo913) said :
#12

Before I punch-out PROBLEM SOLVED I would like you to know I really appreciate your help.

Revision history for this message
Lorenzo Tom James (jameslorenzo913) said :
#13

All is well.