Post count: 526

To change permissions do this: sudo chmod -w <path/to/file>
the -w means remove write permissions.

To change ownership (if it’s owned by the pi user) sudo chown root:root <path/to/file>

I’d highly recommend that you take a look at this and get to know some of these commands. Doing so will make life much easier when making changes to your pi.