Skip to main content
297 votes

USB devices showing as read only

See this bug. Run this command to kill Nautilus (Files): killall nautilus
wayofthefuture's user avatar
94 votes

Why does my NTFS partition mount as read only?

Happened to me, all I did was sudo ntfsfix /dev/sdxX # where x is HDD and X is drive number, in my case it was /dev/sda1 it will remove any logfile created by windows. worked for me.
Hammad Farooq's user avatar
87 votes

Why does my NTFS partition mount as read only?

Performing a full shutdown of Windows will allow the drives to be fully mounted by Ubuntu. This can be accomplished by holding the SHIFT key as you press the "Shut down" button on the "...
schulwitz's user avatar
  • 987
68 votes

How to fix "The destination is read-only" error on HDD partition

For me the solution was quite simple: killall nautilus First I tried with gpart and disk utilities to erase the partition but the problem still there, I saw answers about mount by hand or about win ...
Rodrigo's user avatar
  • 781
59 votes
Accepted

Why can I modify a read-only file?

As @Rob already mentioned, you can only do this if you have write access to the directory containing the file. Attempting to do the same thing to a file in, for example, /etc will fail. As for how ...
terdon's user avatar
  • 102k
42 votes
Accepted

How to Fix "Read-only file system" error when I run something as sudo and try to make a folder/file?

This worked for me: First, run this command with sudo permission: sudo fsck -n -f Then reboot the machine. The options -f and -n are documented directly under man fsck, but under the filesystem-...
user639154's user avatar
37 votes

Why does my NTFS partition mount as read only?

If it happens in case of dual booting with Windows 10, you need to uncheck turn on fast startup in Control Panel --> Power Options --> Choose what the power buttons do and then shutdown, not ...
krkart's user avatar
  • 619
32 votes

How to mount a hard disk as read-only from the terminal

When mounting the filesystem read-only, some trouble may happen. The system may try to write into the device anyway and fail. For that reason the noload flag may be used, to notify to the system that ...
shahar_azulay's user avatar
31 votes

Why can't snap files be modified in any way?

While the premise of the question is technically correct (you can't change files of a snap), there are ways to work around this. One such way is to use the --bind option in conjunction with mount, ...
wheeler's user avatar
  • 692
24 votes
Accepted

Opening a file in read-only mode using nano

Nano does not use '-R' as a "read-only-" option and uses '-R' for something else. -R, --restricted Restricted mode: don't read or write to any file not specified on the command line. ...
Rinzwind's user avatar
  • 304k
24 votes
Accepted

Can a "read-only" µSD card be salvaged?

Your SDcard has reached end of life. It will always be read only from now on. This is a protective mechanism when the controller detects the SDcard is not safe to try to write any more data to the ...
stumblebee's user avatar
  • 4,095
20 votes

USB devices showing as read only

I got the same error when using GParted to set partition table and format my USB stick.. after that all USB drives went to "read-only". But under root copying worked fine... Issue was gone after ...
Koyot's user avatar
  • 201
19 votes

How to edit read-only file in /etc?

If you are editing a file without sudo, and you need sudo in order to save, simply use this vim command: :w !sudo tee % Credit to Dr Beco. Note that vim will notice the file change and ask you if ...
NonlinearFruit's user avatar
19 votes

USB devices showing as read only

I've been having the same problem on Ubuntu, and none of the answers given here so far worked for me. Here's what I tried: Format the device using GParted. I even tried re-creating the partition ...
Serrano Pereira's user avatar
17 votes
Accepted

Why can't snap files be modified in any way?

It's impossible to change the contents of the snap without re-building the snap. This is primarily a security measure, to ensure that the snap hasn't been tampered with. However, the icon referred to ...
popey's user avatar
  • 24k
17 votes
Accepted

How to fix read-only usb drive?

If the USB was once writable and is now no longer, this suggests 3 things in my mind: A hardware switch on the device has been toggled. If this is the case, the simple fix would be to find that ...
hunteke's user avatar
  • 478
15 votes

Why can I modify a read-only file?

As long as you own the parent directory you can remove, or replace a file no matter the permission since you can change the content of the directory :). Try it with other command like rm, it will ...
Rob's user avatar
  • 251
15 votes

Why can I modify a read-only file?

Using w! you are removing the original file (which you are permitted to do) and writing your version instead. When you have write access to a directory, you can: create, move or delete files within ...
Ravexina's user avatar
  • 56.2k
15 votes
Accepted

Howto mount drive as read-only with fstab

You simply have to add the ro mount option, which stands for "read-only". In /etc/fstab entries, mount options are specified in the 4th column of each entry, so you could append it to that one e.g. ...
Byte Commander's user avatar
  • 109k
14 votes

How to Fix "Read-only file system" error when I run something as sudo and try to make a folder/file?

If you are dual booting Windows with Ubuntu and you do not have any error in dmesg, then the problem could very well be caused by Windows. In Windows go to Control Panel → Power Options and disable ...
Prejith P's user avatar
  • 251
14 votes
Accepted

snap: edit docker configuration

https://github.com/docker-archive/docker-snap/issues/22 mentions that the daemon.json file should be in this folder : /var/snap/docker/current/etc/docker/daemon.json or /var/snap/docker/current/...
Koen's user avatar
  • 1,237
14 votes

New 1TB disk works with 18.04 but not 22.04

it is an NTFS filesystem and that is Windows. chmod is a Linux command so useless on Windows. The mount command is not correct so that is more likely the problem ... ... but if the NTFS filesystem is ...
Rinzwind's user avatar
  • 304k
10 votes

How to Fix "Read-only file system" error when I run something as sudo and try to make a folder/file?

When accessing an HDD from different OS (Windows & Linux) the disk could contain an unclean file system. So the metadata cached in the OS, deny mounting the disk To try to correct the mistakes, ...
Braian Coronel's user avatar
10 votes
Accepted

How do I open a large file in a terminal (using vim causes terminal to hang)?

When dealing with large files, it's better to minimize the amount of information you're going to deal with, and there are tools for that. One tool that has been mentioned is grep to search for ...
Sergiy Kolodyazhnyy's user avatar
9 votes

How to fix "sudo: unable to open ... Read-only file system"?

If you have the graphical user interface go to the disk application, select the drive with the issue, click on the gears icon and choose the option Repair Filesystem. In less than a second the problem ...
diegosasw's user avatar
  • 231
9 votes

USB devices showing as read only

I formatted using Gparted. That wiped all data in the disk and it turns out it also fixed the problem.
Adrian Lopez's user avatar
9 votes
Accepted

How to fix "The destination is read-only" error on HDD partition

I have the same issue and tried almost everything. Fortunately, found a solution to the problem from this thread : Read-only partition, dual boot WIn10 The Windows 10 update reseted it to the default ...
Jithin Raveendran's user avatar
9 votes

Why can I modify a read-only file?

See :help write-readonly: write-readonly When the 'cpoptions' option contains 'W', Vim will refuse to overwrite a readonly file. When 'W' is ...
muru's user avatar
  • 202k
8 votes

How to fix "sudo: unable to open ... Read-only file system"?

If you're dual booting your machine with Ubuntu and Windows together and this issue occurs,it's because Windows changes the filesystem,in that case this might do the trick. Try disabling fast startup ...
Maulik Pipaliya Joyy's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible