Cannot write on VM disk, access denied

Discussions related to using VirtualBox on Windows hosts.
Post Reply
lucasander55
Posts: 6
Joined: 22. Jul 2022, 14:35

Cannot write on VM disk, access denied

Post by lucasander55 »

I am using a Flash Drive as a Floppy disk on a Win98 VM, the Flash Drive is formatted with FAT12, works as a Floppy disk and there are some files in it, but I am unable to create new files or delete the ones that already exist. I get some kind of "access denied" error when I try to delete them, which says that I should check if the disk is not full, write-protected, or currently in use.

How can I change my permissions so I am able to write and delete files within this disk?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot write on VM disk, access denied

Post by mpack »

lucasander55 wrote:I am using a Flash Drive as a Floppy disk on a Win98 VM
How exactly are you doing that? Formatting a disk with FAT12 does not make it a floppy, nor could you mount it in a VirtualBox VM as a floppy.

You could format a flash drive using FAT12, but you couldn't access the full size (assuming the flash drive is larger than 32MB).

If what you did was format a flash drive using FAT (*) and then access it as a raw hdd (not a floppy) then yes, that would give you access permission errors on Windows hosts, unless you offline the drive first.

What exactly are you trying to achieve? Getting files into a Win98 VM will be best done using ISOs, virtual ISOs, or network shared folders.

(*) Your window host will not offer to format a flash drive using FAT12. If the drive is small enough (<2GB) then FAT16 might be an option.
lucasander55
Posts: 6
Joined: 22. Jul 2022, 14:35

Re: Cannot write on VM disk, access denied

Post by lucasander55 »

Sorry for the unclear explanation, I am translating a rough idea of what my superior told me. Still, I would like to be able to modify this disk, I will attach a few screenshots of how the VM is set up for you to see it more clearly. If you have any ideas for a possible solution, I would be thankful
Attachments
this is the disk I want to write on, but I don't seem to have permissions
this is the disk I want to write on, but I don't seem to have permissions
Captura3.PNG (29.84 KiB) Viewed 2420 times
Captura2.PNG
Captura2.PNG (16.04 KiB) Viewed 2420 times
Captura.PNG
Captura.PNG (25.73 KiB) Viewed 2420 times
Last edited by mpack on 22. Jul 2022, 16:52, edited 1 time in total.
Reason: Remove unwanted verbatim quote of immediately preceding post.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot write on VM disk, access denied

Post by mpack »

Can you show me the properties of host drive F: ? I want to see format and capacity.

... I can't seem to get VirtualBox to let me map a host USB flash drive to a virtual floppy drive. I am reluctant to look for ways to format a USB flash drive with FAT12, as that makes no sense for any flash drives I have here.

And you still did not tell me what you are trying to achieve. This smells like an "X-Y problem" to me, i.e. you have problem X but you ask about your own proposed solution Y instead of the original problem X.
lucasander55
Posts: 6
Joined: 22. Jul 2022, 14:35

Re: Cannot write on VM disk, access denied

Post by lucasander55 »

Is this screenshot useful? - It made me think that it might be because it's running out of space, but the error message happens when I try to delete a file from it rather than moving or creating one in it, which led me to the conlusion that it's a permission issue
Attachments
Captura4.PNG
Captura4.PNG (18.3 KiB) Viewed 2396 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot write on VM disk, access denied

Post by mpack »

The properties do not show the capacity I would expect from a floppy, which tells me that the filesystem is not correct.

Also, it shows the filesystem as FAT. Let me do some experiments.
lucasander55
Posts: 6
Joined: 22. Jul 2022, 14:35

Re: Cannot write on VM disk, access denied

Post by lucasander55 »

mpack wrote: And you still did not tell me what you are trying to achieve. This smells like an "X-Y problem" to me, i.e. you have problem X but you ask about your own proposed solution Y instead of the original problem X.
My main goal for the time being is getting the disk to work properly. The use for the disk itself, I don't know, I wish I could ask my superior but my shift is over and he is out of town right now, I'll update you on what the objective is when I get the chance.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot write on VM disk, access denied

Post by mpack »

mpack wrote:Let me do some experiments.
The experiment I wanted to try was to see if my Win10 host would allow me to partition a modern USB flash drive with a 1.44MB partition, which could then be formatted with FAT12. So far it is not letting me do that. The minimum partition size is 8MB, and that will be FAT16.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot write on VM disk, access denied

Post by mpack »

Ok, issue confirmed.

I was able to format a USB flash drive to FAT12 by using the free Win32DiskImager tool and copying a 1.44MB floppy image onto the USB flash drive. After that, VirtualBox does indeed allow me to map this host device as a virtual floppy drive in an XP VM.

But I can't write to it. Attempting to copy a small text file onto an otherwise blank floppy results in:
Floppy_Write_Err.PNG
Floppy_Write_Err.PNG (15.19 KiB) Viewed 2396 times
I think you are out of luck with this. I don't consider this a bug. Obviously the VirtualBox feature is intended to be used with actual floppy drives (including actual floppy drives mounted in USB caddies, which is what this probably looks like), or with floppy image files. I don't expect that they envisaged a USB flash drive with a FAT12 partition, and unless this is one of those things that tickles developer michaln's fancy (he has a fondness for keeping really old Dos/Win3/Win9x systems going), then I don't see finding a solution to this problem getting much priority.

So perhaps tell me about that X-Y question, when you can.
lucasander55
Posts: 6
Joined: 22. Jul 2022, 14:35

Re: Cannot write on VM disk, access denied

Post by lucasander55 »

I'd ask for what solution you'd suggest but the end goal in question is still not very clear. I'll ask about it on Monday and update you. Thank you for your patience with my gen z ignorance
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot write on VM disk, access denied

Post by mpack »

lucasander55 wrote:I'd ask for what solution you'd suggest
I gave suggestions in my first post here.

Assuming that the real problem "X" is that Win98 has no Guest Additions and therefore no simple Shared Folders feature, and it also has no support for generic USB mass storage, I proposed :-
Getting files into a Win98 VM will be best done using ISOs, virtual ISOs, or network shared folders.
Another possibility is to add third party drivers for USB mass storage. These exist and instructions are in the Win98 tutorial.

You might also like to check up why the VM needs to be Win98 at all. It's a strange choice 24 years after it was current. Win2K or XP can almost certainly run any software intended for that OS, and both are supported by Guest Additions.
lucasander55
Posts: 6
Joined: 22. Jul 2022, 14:35

Re: Cannot write on VM disk, access denied

Post by lucasander55 »

Hello again! Fortunately the issue was fixed. The goal was to use this flash drive as a floppy to copy files from an old computer to a portable storage device to use them with a newer computer, but after struggling to make it work we just decided to use a virtual floppy drive (.img file) to copy the files and resort to a software called ImDisk to mount/dismount it for ease of access. I appreciate your willingness to help with my problem, but I suppose my original method was just too troublesome.
Post Reply