Permissions
Read rwx permissions and change them without opening everything to the world.
What you will be able to do
- Use ls -l to read permissions.
- Use chmod with symbolic or numeric modes.
- Use chown to change ownership.
- Scripts need execute permission to run directly.
In plain English
Every file has an owner, a group and permissions for user, group and others. r is 4, w is 2 and x is 1. Use the smallest permission that works; 777 is almost always a mistake.
chmod +x deploy.sh
chmod 644 notes.txt
chmod 700 secrets/
ls -l deploy.sh notes.txt secretsYour turn
EasyMake a script executable
Add execute permission for the owner of a file named deploy.sh.
BASH · starter
chmodCheck your understanding before moving on.
Knowledge checkQuestion 1
What does permission 644 mean?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.