I am working on a site for someone at the moment, and one of the scripts is a photographic proofs/order form.
The way it works is a new account is created, which makes a director (mkdir($path,0755)😉 and creates a database entry storing their username/password etc.
The problem I think, which I think may be to do with how the server is setup, is that PHP runs as a group, creates the directory with itself as the owner, which means that the directory which is created can't be written to via FTP.
I was wondering if there is anyway around this? is it to do with me not using umask(); before creating the directory?
I can't use PHPs chown(); as it comes up with an error, even when the correct information is provided (server configuration perhaps?)
The host does not give people shell access so everything has to be done with scripts or with their configuration tool (not the best setup, I know, but you get that.)
I would appriciate any help you may be able to provide.
Reguards
Greg.