-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path580.html
More file actions
70 lines (70 loc) · 2.06 KB
/
Copy path580.html
File metadata and controls
70 lines (70 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<h1 id="access">ACCESS</h1>
<blockquote>
<p>n = ACCESS (file)</p>
</blockquote>
<p>Returns the access rights of a file. The string <code>file</code>
follows OS file naming conventions. The returned file permission number
<code>n</code> follows the permission pattern of the chmod() and stat()
system calls. The bits of <code>n</code> (in octal) are:</p>
<table>
<thead>
<tr class="header">
<th style="text-align: center;">Bits</th>
<th style="text-align: left;">Permission</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">0o4000</td>
<td style="text-align: left;">set user ID on execution</td>
</tr>
<tr class="even">
<td style="text-align: center;">0o2000</td>
<td style="text-align: left;">set group ID on execution</td>
</tr>
<tr class="odd">
<td style="text-align: center;">0o1000</td>
<td style="text-align: left;">sticky bit</td>
</tr>
<tr class="even">
<td style="text-align: center;">0o400</td>
<td style="text-align: left;">read by owner</td>
</tr>
<tr class="odd">
<td style="text-align: center;">0o200</td>
<td style="text-align: left;">write by owner</td>
</tr>
<tr class="even">
<td style="text-align: center;">0o100</td>
<td style="text-align: left;">execute/search by owner</td>
</tr>
<tr class="odd">
<td style="text-align: center;">0o40</td>
<td style="text-align: left;">read by group</td>
</tr>
<tr class="even">
<td style="text-align: center;">0o20</td>
<td style="text-align: left;">write by group</td>
</tr>
<tr class="odd">
<td style="text-align: center;">0o10</td>
<td style="text-align: left;">execute/search by group</td>
</tr>
<tr class="even">
<td style="text-align: center;">0o4</td>
<td style="text-align: left;">read by others</td>
</tr>
<tr class="odd">
<td style="text-align: center;">0o2</td>
<td style="text-align: left;">write by others</td>
</tr>
<tr class="even">
<td style="text-align: center;">0o1</td>
<td style="text-align: left;">execute/search by others</td>
</tr>
</tbody>
</table>
<h3 id="example">Example</h3>
<pre><code>IF ACCESS("/bin/sh") AND 0o4 THEN
PRINT "Others can read the file"
ENDIF</code></pre>