chmod is a UNIX/Linux command to change a file's/dir's permissions, it exists for php, too
permissions consist of 3 fields: ugo
u = user, the owner
g = group, users of the same group
o = other, anybody else
their values are:
4 = read
2 = write
1 = execute
to combine values, just add them, ie write and read: 6
the mode has to be set as octal, meaning you have to use sth
like this:
chmod("myfile","0" . octdec(600));