I am writing some code to create two folders automatically but it seems to be giving the incorrect ownership (root rather than user) and wrong permissions - they need to be readable and writable. This is the first I've done this sort of thing so I hope someone can help!
They are being creating with the proper name and in the proper place though.
Don
contact@pc-homepage.com
Experienced in HTML, Perl, PHP, VBScript, PWS, IIS and Apache and MS-Access, MS-SQL, MySQL databases
Code:
$oldumask = umask(0);
$ServerPath = getenv("DOCUMENT_ROOT");
$NewUserFolder = mysql_insert_id() . "-" . CCGetParam("FirstName", "") . CCGetParam("LastName", "");
mkdir($ServerPath . "/files/" . $NewUserFolder, 01755);
mkdir($ServerPath . "/files/" . $NewUserFolder . "/temp/", 01755);
umask($oldumask);
They are being creating with the proper name and in the proper place though.
Don
contact@pc-homepage.com
Experienced in HTML, Perl, PHP, VBScript, PWS, IIS and Apache and MS-Access, MS-SQL, MySQL databases