Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling write protected media #3446

Open
ToIstvan opened this issue Aug 18, 2024 · 4 comments
Open

Handling write protected media #3446

ToIstvan opened this issue Aug 18, 2024 · 4 comments

Comments

@ToIstvan
Copy link

Distribution

Mint 22 (but 21.x too)

Package version

6.2.8 (but olders too)

Frequency

Always

Bug description

Write protected SD card, or write protected floppy (I Have an USB floppy drive also).
Try to copy something to a write protected media. An error message says the media is write protected - OK.
But the copy process still working, and not stopping. Anytime after, try to shut down, or restart the system, got a warning message: copy process running, do you want to kill it or cancel the shut down/restart....

Steps to reproduce

For first sorry, I am using a localized Mint, so I don't know the exact messages in English.

  1. switch an SD card or floppy to write protected state.
  2. Put in the drive
  3. Nemo window appears
  4. try to drag some files here or try to copy in another way to media.
  5. Write protected warning message appears
  6. copy progress bar still working
  7. close the copy progress window with progress bar
  8. wait a bit, or more.
  9. try to restart or shut down the system
  10. See the warning about copy progress....

Expected behavior

kill the copy process when write protected media detected.

Additional information

There is also some kind a semantic bug in general I think, if you try to write images with dd to a protected media, the process is going on even the write protected state is detected, you must unmount the drive to stop it.

@Jeremy7701
Copy link
Contributor

Are you using copy - perhaps in nemo or are you using dd to write to a device?
These are very different commands.
dd requires great care in its usage - it can overwrite anything!

@ToIstvan
Copy link
Author

Are you using copy - perhaps in nemo or are you using dd to write to a device? These are very different commands. dd requires great care in its usage - it can overwrite anything!

No, I used dd (in terminal) to write some image files to floppy disk, just I mentioned that I ran in the same issue when the floppy was set to write protect even with dd. The nemo symptom exist regardless of this.

@Jeremy7701
Copy link
Contributor

With the nemo problem, are you using a hardware switch on the device for the write protection? I would guess that low-end devices don't inform the OS that they are in a read-only state, so nemo waits for an attempted write operation to complete.

Similar considerations would apply to dd.

@ToIstvan
Copy link
Author

The USB floppy drive is a low-end hardware of course, but the SD-card drive in a HP laptop maybe not. But anyway, nemo displays a "write protected media" message, as wrote, so the read-only state is detected. After this message the copy process is not stopped...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants