Error writing to file: Read-only file system

My external drive works fine at firs, but after trying to make some larger file transfers eg 6Gb , Im getting “Error writing to file: Read-only file” messages and “you are not the owner cannot change permissions” messages? I also suddenly see locks on all the folders and files in the external drive? its an external nvme 512Gb drive connected by USB. With file transfers of eg movies, it just hangs half way.

If I reboot, it seems ok for a few minutes then when I do any transfers of files to the drive, it suddenly says read only again and locks appear suddenly on all the folders and files?

Also happens when I transfer a folder with alot of small files.

I’ve tried formatting drive and still same problem.

What’s the partition and format on the external ssd?
Show us lsblk -f please.

ext4 1.0 777fc052-036f-4a55-8ad9-c6cbfef240ad 418.2G 6% /run/media/s1888889/777fc052-036f-4a55-8ad9-c6cbfef240ad

its an ext4 partition

Do you use sudo for copying, or a root-shell or root-instance of your file-manager?
If not, that would explain the permissions-error.

No I just want to copy files to do a manual back up. I just copy and paste. It worked fine like a normal drive before…Until I used the drive to back up a clonezilla image which failed because the drive was too small…After that I formatted the drive and I keep getting these read only and you dont have permission messages constantly. Even formatting a few times doesnt revert to normal. Its just an nvme external drive. My other drives work fine…I dont know why it always fails when copying alot files and suddenly locks appear and the drive seems inaccessible cant paste files or anything into it.

How do I make it back into a normal external drive?

Use gparted and delete everything, even the partition table. It might be corrupted due to some past errors.

ya I was using Disks app but that didn work…OK i try use gparted…just delete all the partitions and then format like usual? And now locks appear on all the folders and files in the drive again…?

Delete all partitions and the partition-table. Create a new partition table, then a new partition, then format as usual.

I deleted partitions, didnt see partitions table in gparted but created new partition table…and formatted to ext4 (renamed the drive to midas)… I tried transfer some files and it wont let me paste any files into the drive, I get message example

Error opening file “/run/media/s1888889/midas/To Do Oz.odt”: Permission denied

edit: Also if I do “Take Ownership” of the drive in Disks app then I can paste a few files into the drive but then it hangs half way again if I send a few more. Just hangs.

You could try re-formating the partition using the following command:

sudo mkfs.ext4 -E root_owner=$UID:$GID /dev/sdXY

This should allow you to format a partition with the user-level permissions.

Use lsblk -f to determine the values of X and Y above.

:eye: man mkfs.ext4

Im getting reply

mke2fs 1.47.0 (5-Feb-2023)
/dev/sda1 is mounted; will not make a filesystem here!

Unmount it first.

OK I got this

mke2fs 1.47.0 (5-Feb-2023)
/dev/sda1 contains a ext4 file system labelled ‘midas’
last mounted on /run/media/s1888889/midas on Wed Mar 1 22:45:42 2023
Proceed anyway? (y,N) y
Creating filesystem with 125026560 4k blocks and 31260672 inodes
Filesystem UUID: 98ec7184-3dad-43a5-ab0a-ab18b01ce7d0
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

But problem persists

Now I transferred pasted a few files into the drive ok…but again if I transfer more files it just hangs again and says “error copying to 512gb volume. This destination is read only”

edit: and now locks appear on all the folders and files again in this external drive…

So same error again and transfers hanged. If I right click in the drive the paste word is unbolded and cant paste…If I try unmounting in disks to do again, I get this message now
Screenshot from 2023-03-01 23-03-45

:exploding_head: /dev/sda1 should be your main internal drive, not external. - You said before, /dev/sdb1 was the external drive…

What did you do?!

No. My main internal drive is “nvme1n1”

Phew… :wink:

Could the external drive or the drive-cable be corrupt? Or the usb-port for that matter?

/dev/sdxx is my external drive.

before this i ran check filesystem in Disks and it said uncorrupted. Gparted also showed no errors.

But now I just get
Screenshot from 2023-03-01 23-26-13

Update: NOT a solution. Temporary workaround:

The problem still persists the next day after trying everything.

This problem is very frustrating and annoying. I see online some other people with the same errors but not much resolution. The only work around, not a real solution as such, was I saw someone online say just format to non-Linux format.

So I have formatted the external usb nvme drive to ex-FAT and the problem seems gone temporarily. I can transfer files from my home to the external drive. Its just silly that we have these problems sometimes with Linux partition permissions in external drives still. And I still dont know why there were these linux permission problems, because the drive worked fine for months.

My guess is somehow when I used the drive from clonezilla imagingm clonezilla somehow may have changed and locked or corrupted the external usb drive permissions somehow? But wish there was a simple way to resolve this so I can use linux format…