Skip to content

Commit 798373a

Browse files
authored
Merge pull request #968 from creativecommons/git-chmod
Add File permissions section to Foundational technologies
2 parents 55ff292 + 75ba414 commit 798373a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

content/contributing-code/foundational-tech/contents.lr

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,26 @@ on this site:
161161
[ccos-labels]: /contributing-code/repo-labels/
162162
163163
164+
### File permissions
165+
166+
Please note the following best practices for file permissions:
167+
- `0777` - Anyone can read/write/execute
168+
- ⚠️ Never use these permissions
169+
- `0755` – Owner can read/write/execute, group and others can read/execute
170+
- Should be used for scripts that are executed from the command line
171+
- Shouldn't ever be used for plain text files, images, etc.
172+
- `0644` - Owner can read/write, group and others can read-only
173+
- Default on most systems
174+
175+
References:
176+
- [How to Set Permissions in Linux: A Guide to chmod and chown | DigitalOcean][do-chmod]
177+
- [Mastering Permissions in Git: A Complete Guide to Adding chmod Modes in Your
178+
Repository – TheLinuxCode][tlc-chmod]
179+
180+
[do-chmod]: https://www.digitalocean.com/community/tutorials/how-to-set-permissions-linux
181+
[tlc-chmod]: https://thelinuxcode.com/add-chmod-permissions-to-file-in-git/
182+
183+
164184
## Docker
165185

166186
[Docker (software) - Wikipedia][wikipedia-docker]:

0 commit comments

Comments
 (0)