How Do You Address a Problem Message about a Directory Being Read-only when It Is Not Read-only?

Problem scenarios
One or both of the following applies to your situation:

#1  In Linux you try to move a directory that is not read only (e.g., its permissions are rwxrwxrwx or 777).  You get an error about it being read-only.  Your user is the owner of the directory.  


#2  You are running an Ansible playbook and trying to change the attributes of the file.  You get a failure message like this: "Err no 30: read-only" when you run the playbook.

What should you do?

Possible Solution #1
With shared directories you can get an error about it being read-only when it is not read-only.  Try to copy the directory and its contents to a different location (e.g., cp -R /path/of/source /path/to/destination).  Delete or remove the problem directory.  Now use the backed up directory in the new location for whatever purposes you need.

Possible Solution #2
Stop sharing of the directory momentarily.  Then you may be able to perform the operation.

Possible Solution #3
Reboot the server that appeared to be the cause of the problem.  Perhaps there is a corruption issue or the apparent permissions need to be updated.  Rebooting may fix the problem or help you diagnose the problem.

Leave a comment

Your email address will not be published. Required fields are marked *