We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Changing Permissions

The chmod command lets you change the permissions of a file or directory. It's short for "change mode" (I wish it was called "change permissions," but alas).

To recursively change a directory and everything inside it, use the -R flag:

chmod -R u=rwx,g=,o= DIRECTORY

In the command above, u means "user" (aka "owner"), g means "group," and o means "others." The = means "set the permissions to the following," and the rwx means "read, write and execute." The g= and o= mean "set group and other permissions to nothing." The uppercase -R means "recursively," which means "do this to all of the contents of the directory as well."

Interactive example available with JavaScript enabled.

Remember, . is a special alias for the current directory.

Assignment

As part of your security audit, you need to know who has access to the files in the private directory. The ls command has a -l option (lowercase "L") that will print out the permissions of each file and directory in long format.

    • The owner can read, write, and execute
    • The group can do nothing
    • Others can do nothing

Paste only the 10-character permission string of the updated private directory itself (not its contents) into the input field and submit your answer.