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

ปุ่มแปลไทยจะเปิดบทความผ่าน Google Translate เพื่อแปลอัตโนมัติ โดยคงโค้ดและคำสั่งไว้ตามต้นฉบับ

Linux Commands / IT Support Guides

Read Linux permission bits before changing access

Permission denied can come from the file, its parent directories, an ACL or a security policy. Start with ownership and mode bits rather than applying broad recursive permissions.

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

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

Try the diagnostic command

Use the stated shell and platform. Replace sample domains, addresses, services and paths with values from the system you are authorized to support.

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

How to read the result

The directory listing shows traversal-related permissions on the example path. stat reports detailed file metadata, including owner, group and mode.

What to do next

Replace the paths and check every relevant parent directory. Compare the service account's effective access with the application's documented requirements before proposing the smallest change.

Before you make a change

Avoid chmod 777 and recursive ownership changes as generic fixes. ACLs, read-only mounts and SELinux or AppArmor can still block access when mode bits look correct.

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