GICT knowledge base
What Do Linux File Permissions Mean?
Published
Linux permission bits control read, write and execute access for a file’s owner, group and everyone else. Numeric modes describe permissions assigned; there is no universal mode applied to every file. Creation mode, the process umask, application and hosting configuration all matter.
For a regular file, 0644 conventionally gives the owner read/write access and the group and others read access. For a directory, execute means search or traverse, so a common mode such as 0755 lets others traverse and list it. A directory with only 0644 is generally not usable as a normal traversable directory. These are examples, not settings to apply recursively.
Use only the permissions a particular file needs. A script invoked as python3 script.py does not need its executable bit; a script run directly may need execute permission and a valid interpreter line. CGI requirements depend on web-server configuration. Apache suEXEC has ownership and permission checks, so follow your hosting provider’s requirements.
0777 allows the owner, group and others to write, subject to directory traversal, ACL and filesystem rules. That can let other local users or processes alter the file. It is not a safe general fix for an upload, permission or CGI error. Inspect ownership and the specific path, then grant the narrow access needed. See the GNU permissions guide.
Related guides
How to Restrict an SSH Key to One Command
Restrict an SSH key to one command with authorized_keys options. Protect the command and check that unwanted shell and forwarding access are denied.
Linux and CommandsSelf-Hosted Video Processing With FFmpeg: A Practical Guide
Learn how to self-host video processing on a VPS using FFmpeg, with practical commands for conversion, compression, thumbnails, and automated workflows.
Linux and CommandsHow to use nohup: Commands in Linux That Survive Terminal Closes
Keep commands running after you close the terminal. nohup examples with wget, Python, rsync, and Docker on any VPS.
Linux and CommandsHow to Fix “Too Many Open Files” Error on Linux Servers
Learn how to fix the "Too Many Open Files" error on Linux servers by understanding file descriptors, adjusting limits, and diagnosing leaks effectively.
