Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

Articles are written in English. The Thai translation button opens Google Translate; code and commands stay in their original form.

Linux Commands / IT Support Guides

Read Linux permission bits before changing access

Read Linux file permissions and check the directories that lead to the file.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution

Understand the problem

Identify the file and the account that needs access. Replace the example paths with the actual directory and file.

Run the command

Use ls -ld to show the parent directories themselves, then stat to inspect the permissions and owner of the file.

ls -ld /srv /srv/app
stat /srv/app/config.ini

Read the output

A mode of 0640 allows the owner to read and write and the group to read. Other users receive no access through those mode bits. In a directory, the execute bit controls whether an account can traverse it.

Choose the next step

Check the account’s groups and walk the full path one directory at a time. If ordinary permissions look correct, check access control lists or service restrictions before changing the file.

Before making changes

Record the original owner, group and mode before any change. Grant only the access the application needs and verify it with that application’s account.

Source & further reading

GNU Coreutils — stat invocation

Independently written summary reviewed on 2026-11-01. The example illustrates a possible application; it is not a client case study.

Share this article

Back to all articles