Re: ownership and permissions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/6/07, blueboy <ross@xxxxxxxxxxxxx> wrote:

t: 0131 553 3935 | m:07816 996 930 | ross@xxxxxxxxxxxxxx |
http://www:blue-fly.co.uk


I cannot delete a couple of folders on the server as the have the owner
'nobody'. All I am doing is making the folders with

mkdir($customer_id, 0755);


Now is there a way to set the ownership when I created the folder. What is
the appropriate folder levels for securoty (755, 640?)

Thanks,

R.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



   If you search the archives, I wrote out a very long post on file
and folder security a few weeks back.  Also, chances are, you can't
chown() the files with your PHP scripts, but you can do either....

<?
   exec('rm -fR '.$customer_id.' >> 2>&1',$ret,$xc);
   $xc == 1 ? echo $ret : '';
?>

   .... or, by far easier....

<? unlink($customer_id); ?>

   Since your existing scripts run as user: nobody, the file delete
script will, as well, meaning the files and folders that were created
via the web can be removed via the web.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux