Create a new file in etc folder. Read Only acess

I am trying to insert my ca certs in my openwrt. I don't have the space for installing any ca package, so I decided to add an existing certificate which I already have. But when I am writing in the file with "vi" and trying to save it, it gives me the reply with "Write Only access". Please help me.

Check the permissions of the existing file. Is it set to r-- or r-x?

-rw-r--r-- 1 root root 0 Aug 27 20:44 ca-bundle.pem
so how change the write permission?

WinSCP (for Windows) is the easiest mode. Connect to your router with SCP protocol.

still getting error with -

**"Command 'chgrp -R "root" "certs"'**
**failed with return code 1 and error message**
**chgrp: certs/ca-bundle.pem: Read-only file system**
**chgrp: certs: Read-only file system**
**chgrp: certs: Read-only file system."**

Those permissions are:
Owner (or user): rw-
Group: r--
World (or everyone else): r--

The owner is root. The owning group is root. So, the root user should have write permissions anyway.

What user account are you using when you try to edit the file?

Post the output of mount

and "df -h"
and "logread | grep overlay"

I guess that you might have a quite full overlay partition that will then get mounted read-only.

1 Like