A practical example
A public website directory owned by the deploy account
A web server needs to traverse a document directory and read public files, while only the deployment account should change the directory contents. Mode 755 can provide that directory access when file modes, ownership, parent directories, and the web-server account are also configured correctly.
Before saving the change
- Run ls -ld on the directory and confirm the intended owner and group.
- Check files separately; ordinary public files commonly use 644 and do not need execute.
- Test access as the service account before applying the mode recursively.