UPLOAD

patael

New member
UPLOAD

היי. בניתי ממשק המאפשר UPLOAD למשתמשים. לכל משתמש יש תיקיה. הגנתי על התיקיות בכך שקובץ PHP מכל סוג שהוא לא יתקבל. נניח שהמשתמש הצליח להחדיר לי קובץ PHP לשרת. איך אני יכול למנוע אפשרות הרצה שלו. הבעיה שלי היא שהמטרה היא שהמשתמשים יהיו יכולים לצפות בקבצים שלהם בשרת. איך אני מגן על התיקייה יותר, או מונע צפייה בדפי PHP התיקייה היא (0777) תודה.
 

matroz

New member
file permissions

what you have to do is change the file permissions , so that php files will not be read. you should think about other languages except from php. if your using winX- you should think about any executable and asp,vbs. on all platforms - .pl,.cgi... those files can harm your server. you should really think about what you are doing before you let anyone upload files to your server.
 

patael

New member
I THINK IY IS 2 LATE

CHANGING LANGUAGE. I USE 2 KNOW ASP BUT I PREFER php ANY WAY THANKS, I´LL STAY WITH PHP
 

matroz

New member
you don´t understand me

nobody said changing the language you write in. what i say that if you must think not only about not allowing to run php files but other languages as well. unless you do that, you should not allow uploads to your server.
 

matroz

New member
vbs and servres

if the platform is winX, a vbs file can damage the system- you are using a ´web thinking´ which is wrong,because i don´t need a browser to harm your computer. a vbs can do almost anything to the computer.
 

DannyZ

New member
אהה

בהתחלה חשבתי שאתה מיעץ לו להשתמש בשפות אחרות.. לכותב ההודעה המקורית: אם אתה רוצה ללכת על בטוח לגמרי אתה יכול לכתוב איזהשהו סקריפט שייצור למשתמשים דפים לפי נתונים שהמתמש יזין, והקבצים היחידים שיוכל להעלות יהיו קבצי מדיה.. משהו דומה ל mp3.com אבל זה יכול לגרום לאנשים לא לרצות לבוא... אפשרות אחרת יכולה ליהיות שכל קובץ שיועלה יצטרך לעבור אישור. וכשהוא יועלה הוא לא יועלה בסיומת האמיתית שלו אלא ב.txt או משהו כזה. אחרי שהוא יואשר הוא יהיה בסיומת האמיתית..
 
למעלה