Chmod

From Grey Hack Wiki
Jump to navigation Jump to search

Chmod is a generic shell script, it is already installed on your computer at the start of the game. It is used to set the permissions of folders or files.
Note: to use chmod you will need to be root, otherwise you will only able to set permissions of the files that you are the owner.

Permissions

There is also 3 type of user that are restricted under the permissions.

  • User, which is the owner of the file or folder. Is referrer is 'u'.
  • Group, which are the users on the current computer. Is referrer is 'g'.
  • Other, which are the guest. Is referrer is 'o'.

Permissions define what a user can do with a file. There's 3 type of permissions.

  • Write, which allow the writing of files or folders. Is referrer is 'w'.
  • Read, which allow the reading of files or folders. Is referrer is 'r'.
  • Execute, which allow the execution of a files. Is referrer is 'x'.

There is 2 operators , to signal if we want to remove or add permissions.

  • + , define that we want to add permissions.
  • - , define that we want to remove permissions.

There is 1 option parameter.

  • -R, which allow to apply recursively the permissions of a folder to all is child.
Chmod a file

To set the permissions of a file, simply open a terminal on your computer and type chmod [u,g,o][+,-][wrx] [file] or
chmod [u,g,o][+,-][wrx] [path/file].

Chmod file2.png












Chmod a folder

To set the permissions of a folder, simply open a terminal on your computer and type chmod [u,g,o][+,-][wrx] [path/folder].

Chmod folder.png






Chmod recursively a folder

To set recursively the permissions of a folder, simply open a terminal on your computer and type chmod -R [u,g,o][+,-][wrx] [path/folder].

Chmod r folder.png

Debug data: