Unix file permissions
Grant read-only permission to user.
chmod 400 <file>
Grant read and write permissions to user.
chmod 600 <file>
Grant read, write and execute permissions to user.
chmod 700 <file>
Notice that we’re only concerned with the first number in the above examples out of the three numbers. We leave the second and third numbers as
The first number relates to the
user permissions, the second to the
group and the third to
others (anyone who is not part of
So if we wanted to change the permissions for
group, we’d modify the second digit like so:
This would grant all permission to
user and read-only permission to
Alternatively, we can do the following if we don’t want to touch