Jump to content

chown can someone please help with this


grandman

Recommended Posts

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 :D

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.