RE: [PHP] mkdir Question

From: Date: Mon, 27 Aug 2001 00:07:19 +0000
Subject: RE: [PHP] mkdir Question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-64560@lists.php.net to get a copy of this message
I 've the same problem and I haven´t the solucion so far. I need to create a file with the correct owner, "nobody" is not usefull at all. Chown and chmod are not the solution, the solution is create the dir or the file directly with the real owner, I saw a script to do that but I can´t find it again and I´m working in it but I can´t solve it. If somebody knows the solution I'd apreciate so much to know it Javi Chris Lambert <chris@php.net> escribió en el mensaje de noticias 006901c12e7a$3f566940$6401a8c0@server... > Setting the file to have 0777 permissions will allow you to read and write > it from any user on the system. However, it doesn't allow you to change the > ownership (or the permissions) unless you're its creator. Giancula suggested > chowning the file from within your PHP script, as you're still directing > from user "nobody". > > /* Chris Lambert, CTO - chris@whitecrown.net > WhiteCrown Networks - More Than White Hats > Web Application Security - www.whitecrown.net > */ > > ----- Original Message ----- > From: Jeff Oien <jeff@webdesigns1.com> > To: PHP <php-general@lists.php.net> > Sent: Sunday, August 26, 2001 4:41 PM > Subject: RE: [PHP] mkdir Question > > > | However even the permission of 0777 doesn't let me do anything to > | the directory or files in it. I can't even chown or chmod anything in > | it using Telnet once it's created. > | Jeff Oien > | > | > Jeff > | > JO> mkdir ("/usr/www/users/xxxx/blah/blah/$username", 0777); > | > JO> it sets it to nobody instead of my username. > | > "Nobody" is the user runng the Apache process that's why it is the owner > | > of the directory. > | > You can "chown" the direcotry from your PHP script after you create > | > it or "chmod" the files you copy there. > | > > | > Cheers, > | > Gianluca > | > > | > > | > JO> I'm then unable > | > JO> to delete or modify files in that directory. Is there a way around > | > JO> this? Thanks. > | > JO> Jeff Oien > | > > | > > | > > | > > | > -- > | > ALBASOFTWARE > | > C/ Mallorca 186 - 3º 1ª > | > 08036 Barcelona (Spain) > | > Tel. +34 93454009 - +34 934549324 > | > Fax. +34 934541979 > | > @@ ICQ 47323154 @@ > | > webmaster@albasoftware.com > | > http://www.albasoftware.com > | > http://www.phpauction.org > | > http://www.gianlucabaldo.com > | > > | > > | > -- > | > PHP General Mailing List (http://www.php.net/) > | > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > | > For additional commands, e-mail: php-general-help@lists.php.net > | > To contact the list administrators, e-mail: php-list-admin@lists.php.net > | > > | > | > | -- > | PHP General Mailing List (http://www.php.net/) > | To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > | For additional commands, e-mail: php-general-help@lists.php.net > | To contact the list administrators, e-mail: php-list-admin@lists.php.net > | > | > | >

« previous php.general (#64560) next »