Jump to content

[SOLVED] mkdir sets user and group as apache? how can i change this?


wmguk

Recommended Posts

hey,

 

my current script:

 

<?php

$thisdir = "/var/www/vhosts/domain.co.uk/httpdocs/clients";
$login = $_GET['login'];

$getpics = "/var/www/vhosts/domain.co.uk/httpdocs/clients/getpics.php";
$newdir = "/var/www/vhosts/domai.co.uk/httpdocs/clients/$login/getpics.php";

if (is_dir($thisdir ."/$login") )
{
echo "" ;
}
else
{

if(mkdir($thisdir ."/$login" , 0755, true))
{
chmod($thisdir ."/$login", 0755);
}
else
{
   echo "<p class='footer'>Failed to create directory... <br> Contact <a href='mailto:[email protected]'>Drew</a></p>";
} 

copy("$getpics", "$newdir");
}

?>

 

However if i manually ftp in the user and the group are set to "apache" and i need the user set to ftpusername and group set to psacln

 

how can i set these?

I did google mkdir but cant see anyway to specify the user/group settings?

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.