A practical example
A static HTML file served by a web server
The deployment account owns index.html and needs to update it. The web-server process only needs to read it. Mode 644 is often enough for the file itself, provided the server can enter each parent directory and no access-control rule blocks it.
Before saving the change
- Confirm the file contains no passwords, private keys, or environment secrets.
- Check the owner with ls -l so write access belongs to the expected account.
- Verify parent directory permissions; a readable file can still be unreachable.