grandman Posted December 5, 2008 Share Posted December 5, 2008 Hello, I have the following small script that makes a members directory on first time log-in: <?php ob_start(); $Database = mysql_connect("localhost", "vars", "vars"); mysql_select_db("vars"); $fields = mysql_query("SELECT * FROM vars"); $Username = mysql_result($fields,0,"vars"); $dirname = $Username; $filename = "ons/cont/" . "$dirname"; if (file_exists($filename)) { header ( "Location: " . "$filename" . "$dirname"); } else { mkdir("on/cont/" . "$dirname", 0777); echo "welcome " . "$dirname" . "Your Area Is Being created."; } ob_end_flush(); ?> I now have a folder, can't write to it, move it, delete it in fact can't do anything with it. S could some kind person please show me in plain English how I should use this chown. Do I put in my username and password for my site, and where do I place it in my little script. Please in plain English if possible, why is it for everyone you solve anther comes along to bite you in your neither regions Oh yes nearly forgot, the 0777 chmod instruction in the script is ignored, the folder has chmod 0755, why is that? DG Link to comment https://forums.phpfreaks.com/topic/135646-chown-can-someone-please-help-with-this/ Share on other sites More sharing options...
lanmonkey Posted December 5, 2008 Share Posted December 5, 2008 http://uk.php.net/chown Link to comment https://forums.phpfreaks.com/topic/135646-chown-can-someone-please-help-with-this/#findComment-706723 Share on other sites More sharing options...
gevans Posted December 5, 2008 Share Posted December 5, 2008 Is it a windows server? mode (chmod) is ignored! try using chmod afterwards; chmod("on/cont/" . "$dirname", 0777); chmod Link to comment https://forums.phpfreaks.com/topic/135646-chown-can-someone-please-help-with-this/#findComment-706725 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.