Why are all my virtual floppy (.img) files write-protected?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Badplayer03
Posts: 5
Joined: 16. Dec 2013, 02:16

Why are all my virtual floppy (.img) files write-protected?

Post by Badplayer03 »

I could really use some help with this problem. I need to be able to write to virtual floppy images. I am currently using several different .img files, including a blank file downloaded from one of the users with this forum. However, every time I go to write to any of them, or even to try formatting them, Vbox always says that the disk is write-protected. What can I do? I thought write-protection was a physical switch that used to be on the 3.5 inch floppies, so how is this emulated? Can I remove this flag somehow? I sure can't figure it out myself, and the manual doesn't seem to indicate how. Can any of you help me?

Or is the problem that I need an image created from a non-write-protected floppy in the first place? If that's the case, the person who posted a blank .img file is kinda silly. What good is a blank disk that can't be written on? If, I however, need an image of a non-protected disk, can someone please post a link for me to download such a file? This is really getting me frustrated to no end. Thanks in advance.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Why are all my virtual floppy (.img) files write-protect

Post by mpack »

If the blank disk is the one I posted here, then certainly it can be written on. Otherwise how do you suppose that a FAT filesystem got on it in the first place? How do you suppose it was blanked?

I would say: check where you put the floppy image files. Check if the individual files are write protected, and note that if your user account doesn't have write access to the folder they're in then VBox can't write to them either.

As you say, the write protect was originally a slider/tab on the physical floppy disk. The feature can easily be simulated for VM purposes, and certainly one good reason for doing so is that the file was placed in a protected folder.

Incidentally: formatting a disk didn't always work in a VM. That oversight was corrected recently, however you neglected to say what VirtualBox version your question relates to.
Badplayer03
Posts: 5
Joined: 16. Dec 2013, 02:16

Re: Why are all my virtual floppy (.img) files write-protect

Post by Badplayer03 »

Thank you so much. I got it - it was a permissions thing with Windows 7. For some reason, even though I am the administrator and sole user of my Windows 7 PC, it always insists on making me a "user" by default even though I have only one login. I tried changing permissions for my "user" option, and this may help in future. However, I realized the simpler solution is just to right-click and run the program as administrator. As soon as I did that, I could read and write to the floppy images at my discretion. That makes so much sense. Darn Windows 7 default settings making us older-school guys lives more restricting than we need it to be. Windows babies users more and more every version.

P.S. I wasn't doubting that the disk had to be writable originally, as the disk had to be formatted at one time, as all disks do. I am one who questions all possibilities, and was simply entertaining the possibility that the disk could have been formatted on a PC, have the tab set to "write-protect", and then the image made from that. I have no idea if the image making program would automatically emulate that in the image or not - it was just a thought. No disrespect or offense intended of course.

Thanks again for helping me out. Being able to write to floppy is a critical aspect of me being able to enjoy this Virtual Box emulation. I'm so happy I don't need to have a bunch of old PC's laying around in order to preserve my past treasures. Virtual Box and Dos Box in tandum are computer software packrat heaven :D

Daniel Gagne
BadPlayer03
Badplayer03
Posts: 5
Joined: 16. Dec 2013, 02:16

Re: Why are all my virtual floppy (.img) files write-protect

Post by Badplayer03 »

Sorry, btw, I meant Virtual Machine, not Virtual Box. I was mixing up the name with Dos Box. I hope I have not offended anyone else who loves this program by calling it the wrong name.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: Why are all my virtual floppy (.img) files write-protect

Post by michaln »

Badplayer03 wrote:Thank you so much. I got it - it was a permissions thing with Windows 7. For some reason, even though I am the administrator and sole user of my Windows 7 PC, it always insists on making me a "user" by default even though I have only one login.
You should not need to run VirtualBox as administrator. What probably happened was that the floppy images were created with administrator privileges and then they weren't writable by a regular user. It should be possible to change the security/ownership settings on the files.

Yes, the whole Windows "security" thing is kind of broken...
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Why are all my virtual floppy (.img) files write-protect

Post by mpack »

Well, just for future reference: the floppy image is a simple raw copy of the disk sectors. There's no header or control file in which one might store flags, so it was never a possibility that the (non-existing) header could have had a write protect flag set.
Post Reply