Where to start First steps track · 15 stages
Linux Labs

chmod / chown — permissions and ownership

cheat sheet · Linux https://lab.dimsanych.ru/en/wiki/chmod-chown/

Cheat sheet

  • chmod 644 file rw-r--r--
  • chmod 755 script rwxr-xr-x
  • chmod 600 secret owner only
  • chmod 2770 team-dir setgid: new files inherit the directory's group
  • chown user:group file owner and group
  • chown -R www-data:www-data /var/www/site recursive (typical for a web root)
  • chgrp devs file change only the group
  • umask current mask for new files

Options

Below are the main flags of chmod and chown; the full list is in man chmod/man chown.

Loading…