Jason Wong wrote:
On Friday 25 October 2002 06:51, Matias Silva wrote:
Hi-ya all, here's a quickie.......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.
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?
I would like to set the owner to "root" and the group to "nc". How canYou can't.
this be achieved
by the php script? Or do I have set this up in the other environments (OS
or Apache)?
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().
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php