reference/filesystem/functions/chmod.xml
5eb55cda5cc4bc61e94f17468c6402d631edafa5
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.chmod">
3
+
<refentry xml:id="function.chmod" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>chmod</refname>
6
6
<refpurpose>Changes file mode</refpurpose>
...
...
@@ -11,11 +11,11 @@
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>chmod</methodname>
13
13
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
14
-
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
14
+
<methodparam><type>int</type><parameter>permissions</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Attempts to change the mode of the specified file to that given in
18
-
<parameter>mode</parameter>.
18
+
<parameter>permissions</parameter>.
19
19
</para>
20
20
</refsect1>
21
21

...
...
@@ -32,13 +32,13 @@
32
32
</listitem>
33
33
</varlistentry>
34
34
<varlistentry>
35
-
<term><parameter>mode</parameter></term>
35
+
<term><parameter>permissions</parameter></term>
36
36
<listitem>
37
37
<para>
38
-
Note that <parameter>mode</parameter> is not automatically
39
-
assumed to be an octal value, so strings (such as "g+w") will
40
-
not work properly. To ensure the expected operation,
41
-
you need to prefix <parameter>mode</parameter> with a zero (0):
38
+
Note that <parameter>permissions</parameter> is not automatically
39
+
assumed to be an octal value, so to ensure the expected operation,
40
+
you need to prefix <parameter>permissions</parameter> with a zero (0).
41
+
Strings such as "g+w" will not work properly.
42
42
</para>
43
43
<para>
44
44
<informalexample>
...
...
@@ -54,7 +54,7 @@ chmod("/somedir/somefile", 0755); // octal; correct value of mode
54
54
</informalexample>
55
55
</para>
56
56
<para>
57
-
The <parameter>mode</parameter> parameter consists of three octal
57
+
The <parameter>permissions</parameter> parameter consists of three octal
58
58
number components specifying access restrictions for the owner,
59
59
the user group in which the owner is in, and to everybody else in
60
60
this order. One component can be computed by adding up the needed
...
...
@@ -99,6 +99,13 @@ chmod("/somedir/somefile", 0750);
99
99
</para>
100
100
</refsect1>
101
101

102
+
<refsect1 role="errors">
103
+
&reftitle.errors;
104
+
<para>
105
+
Upon failure, an <constant>E_WARNING</constant> is emitted.
106
+
</para>
107
+
</refsect1>
108
+

102
109
<refsect1 role="notes">
103
110
&reftitle.notes;
104
111
<note>
...
...
@@ -109,14 +116,6 @@ chmod("/somedir/somefile", 0750);
109
116
</para>
110
117
</note>
111
118
&note.no-remote;
112
-
<note>
113
-
<para>
114
-
When &safemode; is enabled, PHP checks whether the files or directories
115
-
you are about to operate on have the same UID (owner) as the script that
116
-
is being executed. In addition, you cannot set the SUID, SGID and sticky
117
-
bits.
118
-
</para>
119
-
</note>
120
119
</refsect1>
121
120

122
121
<refsect1 role="seealso">
...
...
@@ -132,7 +131,6 @@ chmod("/somedir/somefile", 0750);
132
131
</refsect1>
133
132

134
133
</refentry>
135
-

136
134
<!-- Keep this comment at the end of the file
137
135
Local variables:
138
136
mode: sgml
139
137