read only files in Ubuntu
Solution 1
Sounds to me like a permissions issue. Open terminal and cd
to one of the folders/files affected.
sudo chown -R user:group ./folder
sudo chmod -R 755 ./folder
Solution 2
Check for commonalities in the file locations. Are they all on the same partition? Only in a few subdirectories?
If all affected files are under one (or a small number of) directory(ies), it may be a permissions problem. ricbax's answer gives details to fix the issue, but use
ls -l
to verify that's the problem first.Ubuntu and other linuxes are often configured to remount the system partition as read-only when errors are detected. If this is the case,
chown
andchmod
won't help -- you'll need to fix the filesystem (eg withfsck
) before you'll be able to remount the partition normally. Any partition could potentially be mounted with this option.
Related videos on Youtube
Kenster
Software developer in central Ohio. Currently developing a content management system in Java and JBPM on Linux. I've previously worked with Solaris, Oracle, JDBC, C, C++, Perl, and shell scripting.
Updated on September 17, 2022Comments
-
Kenster over 1 year
Something has gone weird with Ubuntu 8.4 on my computer. Somehow, many files, docs and audio have decided to become "read only". Other files (that I own) are denying permission to view, move copy or otherwise access.
Does anyone know how this could suddenly happen?
Does anyone have a suggestion as to how to return these files to their original status?
-
ElPoney over 14 yearsof course "user" and "group" must be your actual username and groupname
-
William over 3 yearsNice :) But when I tried it, it needed to be sudo chmod 755 -R ./folder ---> not sure if that might be related to the flavor of linux I'm using