chmod

Chmod is a utility responsible for managing the permissions of files or folders. These permissions are read, write and execute files. To run the terminal just type sudo chmod [permiso] [nombre de archivo].

basic terms

  • Types of permits: It is a sector of users who have permissions to the files. It may be the user (or of user), user group (group g) and the rest (other).
  • Read: Allows access certain files and read them.
  • Write: Allows you to edit or save another version of the files.
  • Execute: Run the file (if it is an executable).

Chmod mechanism

Generally permissions are grouped into u for user, g for the group and o for others. It looks like this:
-uuugggooo
Each type has a permit, for example for the user you want to view the file shows 'r'. Same with "w" to edit and "x" to implement. In this case, we make applying these characters in all three types example:

-w--wr-wrx

numerical shorthand

Better to save typing and not confuse you in changing permission form is in numbers. In this case, the three characters replaced by a digit. The most important are:

Number (short)EquivalenceMeaning
0---without permission
4r--Read only
5r-xUse Read and Execute
7rwxAll permissions
6rw-Reading and writing

Examples

If you want to grant permission for everyone to edit, run and see a file is, by the numbers:

sudo chmod 777 [nombredearchivo]

To view the permissions for each file you can use ls -l.

To change the permissions on Deepin 15.5, we select a folder and choose "Open in Terminal". then write sudo chmod 777 [nombredearchivo]. A good tip; If you're going to apply to all subfolders in one fell swoop, repeat steps and writes sudo chmod -R 777 *.

Warning

Do not use chmod in the system folder, unless you know what you do. It could be infected by unwanted software.

Font: from Linux, Wikipedia

Have you found this article helpful?