DELAPARRA
Index
Color
NL
Category: CLI commands

chmod

Explained by Updated

What is chmod?

chmod: Change Mode — Change the read/write/execute permissions of a file. chmod changes file permissions on Linux and macOS: who may read, write or execute a file. Permissions are set for the owner, the group and everyone else. You can use letters, as in chmod +x deploy.sh to make a script executable, or numbers, as in chmod 644 config.php. In the numbers, 4 means read, 2 write and 1 execute, added together per group. So 644 means the owner can read and write, and everyone else can only read.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about chmod

What should you keep in mind with chmod?

A common mistake is chmod 777 to make an error go away. It lets every user and process on the server change the file, which is a real security risk on a web server. Find out which user actually needs access, usually the web server user, and give that user exactly the permission required.

At a glance

CategoryCLI commands
Explained by
Updated

More CLI commands terms

All terms starting with C

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.