Linux Basics

You are currently auditing this course.
52 / 107

Permissions - Using chmod To Change

You can change the permissions of a file using chmod command: chmod permission_cmd myfile

You can allow or disallow the user (u), group (g) or other(o) the following actions: read (r), write (w) and execute (x).

So, if you want to allow the user (the person who owns it) to execute the file:

chmod u+x myfile

And to disallow the user (the person who owns it) to execute the file:

chmod u-x myfile

Say you want to give the rw (read & write) permissions to owner and group of a file, you will have to use the following command:

chmod u+r,u+w,g+r,g+w myfile

    or

chmod u+rw,g+rw myfile

To give members of a group ability to modify a file, use:

chmod g+w myfile

No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...