Changing FilePermission and Ownership using PHP's chmod() function:
Syntax:
Chmod(file, mode)
Mode here specifies the permissions as follows:
* The first number is always zero
* The second number specifies permissions for the owner
* The third number specifies permissions for the owner's user group
* The fourth number specifies permissions for everybody else
Possible values (to set multiple permissions, add up the following numbers)
* 1 = execute permissions
* 2 = write permissions
* 4 = read permissions
Example:
// everything for owner, read for owner's group
chmod("test.txt",0740);
No comments:
Post a Comment