Skip to content

Instantly share code, notes, and snippets.

@doxt3r
Created July 14, 2021 18:25
Show Gist options
  • Save doxt3r/846939c9ea5f0d76e8667ca4e602a06a to your computer and use it in GitHub Desktop.
Save doxt3r/846939c9ea5f0d76e8667ca4e602a06a to your computer and use it in GitHub Desktop.
permissions on linux
Number Octal Permission Representation
0 No permission
1 Execute permission
2 Write permission
3 Execute and write permission: 1 (execute) + 2 (write) = 3
4 Read permission
5 Read and execute permission: 4 (read) + 1 (execute) = 5
6 Read and write permission: 4 (read) + 2 (write) = 6
7 All permissions: 4 (read) + 2 (write) + 1 (execute) = 7
For a website folder using apache:
chown -R $USER:www-data example.com/
chmod -R 2774 example.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment