You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: linux-1/linux-basics.md
+111-4
Original file line number
Diff line number
Diff line change
@@ -307,10 +307,117 @@ cat > $fileName
307
307
308
308
> TODO: Add more information about Linux file permissions \(both `octal` and `ugo-rwx` formats\); Add information about `chmod` and `chown` commands; Add descriptions and examples \(issue [\#8](https://github.com/zweilosec/Infosec-Notes/issues/8)\)
309
309
310
-
`chmod -ugo -rwx -7777 5KFB6`
310
+
File permissions in linux can be expressed in two formats, the rwx and the octal notation.
311
+
312
+
#### rwx notation
313
+
314
+
r = read\
315
+
w = write\
316
+
x = execute
317
+
318
+
In linux the if the permission of a file would be :
319
+
320
+
`-rwxrwxrwx`
321
+
322
+
Then that would mean that the anyone can read, write and execute the file. Breaking down this format into four parts :
323
+
1. The first character would tell if it is a file or a directory, if it is a '-' (hyphen) then it would mean it is a file, but if it is 'd', then
324
+
it would mean that it is a directory.
325
+
2. The next three characters specify the permission of the owner of the file.
326
+
3. The next three character specify the permissions of the group.
327
+
4. The last three character would specify the characters of others.
328
+
329
+
In the above example all of them had rwx assigned to them, hence anyone could read, write and execute this file.
330
+
331
+
#### Octal notation
332
+
333
+
In the octal notation, the permissions are assigned using octal digits.
0 commit comments