Hands-on task
This task is step 16 of the course “First steps in Linux”
Set permissions on a file
/srv/app/secret.env holds the database password. Right now the file belongs to root, and any user on the server can read it — that won't do.
- Make the user
deploythe file's owner and the groupdeployits group. - Set the permissions so that the owner can read and write, the group can only read, and everyone else gets nothing.
What you'll practise:
- chmod
- chown
- file permissions
- owner and group
- octal permissions