On Friday 25 October 2002 06:51, Matias Silva wrote:
> Hi-ya all, here's a quickie.......
>
> In my script I create a directory (mysql.backup.timestamp/) within a
> directory called backup/.
> I use the function mkdir("mysql.backup.timestamp", "0777"); and it shows
> the permissions
> as after the function executes:
>
> dr----x--t 2 nobody daemon 1024 Oct 24 15:16
> mysql.backup.October-24-2002-1516
>
> Where's the permissions (dr----x--t 2 nobody daemon) coming from? Is
> it the php.ini, apache conf or
> the operating system?
The permissions (r----x--t) is coming from your mode setting in your mkdir()
function AND from the system setting umask -- see manual -> umask() and check
out user comments as well.
> I would like to set the owner to "root" and the group to "nc". How can
> this be achieved
> by the php script? Or do I have set this up in the other environments (OS
> or Apache)?
You can't.
The user:group comes from the user running the webserver, which in your case
is nobody:daemon.
Only root can the the user:group ownership of files and directories. So unless
your webserver is running as root you cannot use chown()/chgrp().
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
After years of research, scientists recently reported that there is,
indeed, arroz in Spanish Harlem.
*/
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Richard B. Johnson wrote:
> It's a "tomorrow" thing. Ten hours it too long to stare at a
> screen.
Sissy!
- Jens Axboe on linux-kernel
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php