Linux: Difference between revisions

1,003 bytes added ,  31 March 2020
Line 287: Line 287:


==Permissions==
==Permissions==
In unix filesystems, files and folders have individual permissions.<br>
You can set permissions for each file/folder independently and for the following sets of users:
* User/Owner <code>u</code>
* Group <code>g</code>
* Other <code>o</code>
You can also set permissions for all of the above with:
* All <code>a</code>
Each file and folder can have the following permission for each set of user:
* Read <code>r</code>
* Write <code>w</code>
* Execute <code>x</code>
The above totals 9 bits (3 sets of users times 3 permissions).
In addition to the above, there are 3 special bits:
* Sticky bit <code>t</code> - only allow the owners of subfiles/subfolders to modify them
** Useful for shared folders such as /tmp
* Setuid - automatically elevate execution of this file to the owner's priviledges
* Setgid - automatically elevate execution of this file to the group's priviledges
In total, permissions for each file and folder can be stored in 16 bits or 2 bytes.
===chmod===
===chown===
===chgrp===
==OpenVPN==
==OpenVPN==
See [https://help.ubuntu.com/lts/serverguide/openvpn.html https://help.ubuntu.com/lts/serverguide/openvpn.html]<br>
See [https://help.ubuntu.com/lts/serverguide/openvpn.html https://help.ubuntu.com/lts/serverguide/openvpn.html]<br>