2

I recently got a digital photo frame and when removing photos I did the move to trash instead of Shift+Del and deleting proper and now I have a hidden folder with read only files that I can not remove.

I have tried using the following commands

  • sudo rm -rf: Said cannot remove read-only files system.
  • rm rmdir: Said cannot remove read-only files system.
  • chmod -v u+rw filename: Did nothing.
  • mount -o remount, rw: Did nothing.

I have been able to remove all the actual files off (just the pictures not system files im not that reckless) with rm but this folder remains and I dont want it taking up space that is needed for pictures.

All my Linux skills come from running into a problem I cant solve intuitively then Googling as hard as possible but this remains elusive and I don’t know what else to try but ask for someone to help.

New contributor
Spencer W is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
5
  • 1
    Were you manipulating some sort of memory card you took out from the frame? Or was the frame hooked to your computer as some sort of usb drive when you did the move to trash and attempted to delete the trash directory? Commented Feb 23 at 20:32
  • The photo frame was connected via usb and i was trying to delete things via Dolphin gui but that created the .trash folder and now it wont let me delete it because the things in it are read only file system Commented Feb 23 at 20:43
  • 1
    So it is possible for you to copy photos to the frame via dolphin (or cp) and rm them, but just not this trash directory or anything inside it? Commented Feb 24 at 10:57
  • yes i am able to transfer files with both dolphin and in terminal but i cant not remove the folders inside the trash or the .trash-1000 folder itself, as it says they are read only Commented Feb 24 at 16:17
  • Hmm so you can't even remove the file inside the directory through like "Empty Trash" of the "Trash Bin"? (Do you see the files through the "Trash Bin" -- by that I don't mean browsing the trash directory of the drive -- I hope you get what I mean) I suppose you know where the drive is mounted so can you run findmnt -R on the mountpoint and add the output to your post? (Btw, I don't suppose any fstab entry is involved? You have been relying your DE to mount it through udisks2, right? -- basically automount triggered by your DE or "point and click" to have it mounted) Commented Feb 24 at 19:46

1 Answer 1

1

For USB drives always mounting as read-only it can help to delete the parent folder of the default mountpoint, which on Arch-based distros is /run/media/$USER (and usb would be mounted at /run/media/$USER/myusbdrive) and Ubuntu-based ones just /media/$USER ($USER is an environment variable containing the username).

Unplug all drives, then delete the folder:

cd /run/media
ls
# Confirm it's empty, nothing mounted anymore
ls $USER
rmdir $USER
# In relevant cases will require root
sudo rmdir $USER

You can also simply write out the value of $USER instead of using the variable.

If you now re-plug your thumbdrive it should mount writable as expected.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.