http://kb.lamphost.com/index.php?title=File_Permissions&feed=atom&action=history
File Permissions - Revision history
2024-03-29T06:26:43Z
Revision history for this page on the wiki
MediaWiki 1.21.1
http://kb.lamphost.com/index.php?title=File_Permissions&diff=289&oldid=prev
Lamphost at 01:15, 26 July 2013
2013-07-26T01:15:18Z
<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 01:15, 26 July 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 20:</td>
<td colspan="2" class="diff-lineno">Line 20:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>: '''0''':  No Permissions</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>: '''0''':  No Permissions</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">:</del>: '''1''':  Execute-only (uncommon in practice)</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>: '''1''':  Execute-only (uncommon in practice)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>: '''2''':  Write-only (uncommon in practice)</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>: '''2''':  Write-only (uncommon in practice)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">:</del>: '''3''': Write-only + Execute (uncommon in practice)</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>: '''3''': Write-only + Execute (uncommon in practice)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>: '''4''':  Read-only</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>: '''4''':  Read-only</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">:</del>: '''5''':  Read-only + Execute (standard for read-only directories)</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>: '''5''':  Read-only + Execute (standard for read-only directories)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>: '''6''':  Read + Write</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>: '''6''':  Read + Write</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">:</del>: '''7''':  Read + Write + Execute (standard for read+write directories)</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>: '''7''':  Read + Write + Execute (standard for read+write directories)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=== Examples ===</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=== Examples ===</div></td></tr>
</table>
Lamphost
http://kb.lamphost.com/index.php?title=File_Permissions&diff=281&oldid=prev
Lamphost at 21:23, 25 July 2013
2013-07-25T21:23:40Z
<p></p>
<p><b>New page</b></p><div>[[File:File_perms.png|frame|x200px|File Permissions, symbolic notation.]]<br />
LAMP Host's webservers obey unix-like file permissions. File permissions determine which users in the system can read, write, or execute a file. For detailed information and history on Unix Permissions, see Wikipedia's article at [https://en.wikipedia.org/wiki/Unix_permissions https://en.wikipedia.org/wiki/Unix_permissions].<br />
<br />
== Overview ==<br />
Unix permissions can be displays in both textual symbols and numerical values. In its textual notation, a set of permissions is a ten-character string. In numerical notation, three octal digits represent for the file owner, group, and all other users.<br />
<br />
=== Textual/Symbolic Notation ===<br />
The first digit determines the type of file on the server. For general use purposes, this will be a '''d''' character a directory or a '''-''' (hyphen) character for a normal file.<br />
<br />
The next three digits determine the permissions for the file's '''owner''' (i.e., your LAMP Host username). These values always remain in the same order and can consist of '''r''' (read), '''w''' (write), and '''x''' (execute). Note that directories will always contain the e'''x'''ecute permission for permitted users.<br />
<br />
The second set of three digits determines permissions for a file's '''group'''. Unless you have explicitly requested that your server be configured otherwise, usernames and group names will be identical.<br />
<br />
The final set of three digits determines permissions for '''other''' system users than your username and users that are not in the file's group. This set of permissions should generally be restricted to read-only except when you explicitly wish to allow the webserver to write to your files or directories.<br />
<br />
=== Numeric/Octal Notation ===<br />
Particularly when working with file management tools such as [[FTP]] or [[SSH|command-line]] tools such as ''chmod'', users may find it easier to use and memorize common octal notations for permissions.<br />
<br />
The octal notation, commonly referred to as a file ''mode'', generally consists of only three numeric characters. Each character represents the permissions for the user, group, and all users, respectively. Even numbers set read and write capabilities. Adding 1 to any odd numbered mode grants it executable permissions as well.<br />
<br />
: '''0''': No Permissions<br />
:: '''1''': Execute-only (uncommon in practice)<br />
: '''2''': Write-only (uncommon in practice)<br />
:: '''3''': Write-only + Execute (uncommon in practice)<br />
: '''4''': Read-only<br />
:: '''5''': Read-only + Execute (standard for read-only directories)<br />
: '''6''': Read + Write<br />
:: '''7''': Read + Write + Execute (standard for read+write directories)<br />
<br />
=== Examples ===<br />
; Regular file; owner can read and write; others can only read<br />
: ''(These are the default file permissions for new files.)''<br />
: <tt>Sym: '''-rw-r--r--'''<br />
: Oct: '''644'''</tt><br />
<br />
; Regular file; only owner can read or write; others users are denied<br />
: ''(Note: the Apache and Nginx webserver users will not have any access to these files. Files with these permissions will not be accessible over the web.)''<br />
: <tt>Sym: '''-rw-------'''<br />
: Oct: '''600'''</tt><br />
<br />
; Regular file; full read-write permissions<br />
: ''(Note: if your web application needs to write to a file via PHP code, these are the proper permissions to set.)''<br />
: <tt>Sym: '''-rw-rw-rw-'''<br />
: Oct: '''666'''</tt><br />
<br />
; Directory (folder), owner can read, write, and create new files; others can only read<br />
: ''(These are the default directory permissions for new directories.)''<br />
: <tt>Sym: '''drwxr-xr-x'''<br />
: Oct: '''755'''</tt><br />
<br />
; Directory; only owner can read, write, or create new files<br />
: ''(Note: As above with regular file permissions, this breaks the webserver's ability to serve files from this directory.)<br />
: <tt>Sym: '''drwx------'''<br />
: Oct: '''700'''</tt><br />
<br />
; Directory; full read-write permissions<br />
: ''(Note: If your web application needs to create new files in a directory, these are the proper permissions to set.)''<br />
: <tt>Sym: '''drwxrwxrwx'''<br />
: Oct: '''777'''</tt></div>
Lamphost