297
votes
USB devices showing as read only
See this bug.
Run this command to kill Nautilus (Files):
killall nautilus
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.
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 "...
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 ...
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 ...
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-...
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 ...
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 ...
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, ...
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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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/...
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 ...
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, ...
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 ...
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 ...
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.
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 ...
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 ...
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
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
read-only × 443mount × 107
filesystem × 89
usb × 54
permissions × 53
boot × 35
hard-drive × 33
partitioning × 32
fsck × 30
dual-boot × 27
usb-drive × 24
ntfs × 22
ssd × 16
fstab × 16
18.04 × 15
20.04 × 15
gparted × 14
14.04 × 13
format × 13
root × 12
ext4 × 12
drive × 12
16.04 × 11
command-line × 10
files × 10