Re[2]: [PHP] /etc/passwd

2003-07-10 Thread Mantas Kriauciunas
Hello Wendell,

Thursday, July 10, 2003, 6:59:25 AM, you wrote:

>>>  So how to make sure that no one can access other people files and
>>>  server files? and is there any way that nobody would be able to
>>>  download php files or how to make them look like code when they are
>>>  downloaded. Thanks!

WB> I think he means "How do I keep people who have access to upload their
WB> OWN php scripts to my server from accessing files outside their
WB> directory?"  :)

WB> Check out the following:

>> http://www.php.net/manual/en/features.safe-mode.php#ini.open-basedir

>> http://www.php.net/manual/en/security.php
>> http://www.php.net/manual/en/features.safe-mode.php#ini.safe-mode




Thanks a lot! that helped :)

-- 
Best regards,
 Mantasmailto:[EMAIL PROTECTED]



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



Re[2]: [PHP] /etc/passwd

2003-07-10 Thread Mantas Kriauciunas
Hello Marek,

Thanks for the answer, but i think you misunderstood me because of my
bad english. What i mean is the people with that code can access and
view files on any place on my server and see the passwords stored in
some files, decode them, and do stuff like that. I wanted to know how
to prevent that from happening? If the people make file like this, how
to protect myself so they could not view the /etc/passwd file?

Thursday, July 10, 2003, 5:13:33 AM, you wrote:


MK> Mantas Kriauciunas wrote:

>>  The problem is
>>  if the make script 
>>  and then just write
>>  test.php?id=/etc/passwd , they see all the file.
MK> Check if $id is valid. Exact way depends on the structure of the files.
MK> Example 1: All included files are in web root and are named 
MK> something.html, something can contain letters, underscore, digits.
MK> if($id && eregi('^[a-z0-9_]+\.html',$id)) include($id);

MK> Example 2: The included files split into several directories, which can 
MK> contain letters, underscore, digits.
MK> if($id && eregi('^[a-z0-9_]+/[a-z0-9_]+\.html',$id)) include($id);

MK> Sure, this assumes you have nothing to hide in your *.html files.

>> 
>>  So how to make sure that no one can access other people files and
>>  server files? and is there any way that nobody would be able to
>>  download php files or how to make them look like code when they are
>>  downloaded. Thanks!
>> 
>>  P.S If someone knows good links please reply me! thanks a lot!
>> 
>>  ---Don't Get Mad, Ged Glad , Buy Gladware---
>> 



-- 
Best regards,
 Mantasmailto:[EMAIL PROTECTED]



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