Hello,
CHMod affects the permissions of a certain file or directory.
Each permission has a number between 0 and 7. The permission groups are "Owner", "Group" and "Public".
The number for CHMod must be 4 digit, but with only 3 permission groups, so a 0 is added to the front. Why it must be? I dont know :P I just know that there always has to be a 0 there.
The permissions are:
Read = 4
Write = 2
Execute = 1
So if you wanted to grant a folder read access only, but no write or execute access for the public, but full access for Group and Owner, the CHmod would be 0774. If you wanted to grant that folder Read and Write access for the public, and full access for Owner and Group the CHMod would be 0776. If you wanted to grant Owner and Public only read access, but Group full access you would have 0474.
See the pattern?
Now, how to CHMod. You can either use the PHP function chmod(); which is the hard way to do it. The easy way is to get SmartFTP, www.smartftp.com, connect to your FTP and then locate the folder where you upload files. In the tree-view to the left right click on the folder name and click "Properties/CHMOD" and then tick all the boxes so the little text box says "777". That will grant full read,write and execute access, so that the script has permissions to upload.
Hope that makes sense, and that it solves your problem.
|