From 99836ba9dd023aaab70901ee3e1be6292bd34e09 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Fri, 3 Jan 2003 21:32:06 +0000 Subject: [PATCH] Adding explanation of modes in chmod functions documentation. Feel free to correct wording if it is not correct. Also moved Nicos' note on modes here. Point to chmod page from mkdir for mode details. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@110255 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/filesystem/functions/chmod.xml | 39 +++++++++++++++++++++++- reference/filesystem/functions/mkdir.xml | 6 ++-- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/reference/filesystem/functions/chmod.xml b/reference/filesystem/functions/chmod.xml index e673480e82..85ef56a0bd 100644 --- a/reference/filesystem/functions/chmod.xml +++ b/reference/filesystem/functions/chmod.xml @@ -1,5 +1,5 @@ - + @@ -33,6 +33,43 @@ chmod ("/somedir/somefile", 0755); // octal; correct value of mode + + The mode parameter consists of three octal + number components specifying access restrictions for the owner, + the user group in which the owner is in, and to everybody else in + this order. One component can be computed by adding up the needed + permissions for that target user base. Number 1 means that you + grant execute rights, number 2 means that you make the file + writeable, number 4 means that you make the file readable. Add + up these numbers to specify needed rights. You can also read more + about modes on UNIX systems with 'man 1 chmod' and 'man 2 chmod'. + + + + + + + + + + The current user is the user under which PHP runs. It is + probably not the same user you use for normal shell or FTP + access. + + + &return.success; diff --git a/reference/filesystem/functions/mkdir.xml b/reference/filesystem/functions/mkdir.xml index 91b8b6dd23..4c7769f66c 100644 --- a/reference/filesystem/functions/mkdir.xml +++ b/reference/filesystem/functions/mkdir.xml @@ -1,5 +1,5 @@ - + @@ -31,8 +31,8 @@ The mode is 0777 by default, which means the widest possible - access. If you need more information about mode under - UNIX systems, please read 'man 1 chmod' and 'man 2 chmod'. + access. For more information on modes, read the details + on the chmod page.