What mode should I use when I create a folder for uploaded files

e_dsilva

New Member
I have this directory structure:\[code\]\htdocs\htdocs\uploadfiles\\[/code\]Now if a user's id is s001, then I should create a new folder for this user to store uploaded files.\[code\]\htdocs\htdocs\uploadfiles\\htdocs\uploadfiles\s001\\[/code\]Here are my questions:\[code\]Q1> What mode should I use for \htdocs\uploadfilesQ2> What mode should I use for \htdocs\uplaodfiles\s001\\[/code\]Based on \[code\]http://www.elated.com/articles/understanding-permissions/\[/code\]The function I use to create the folder for the user is as follows:\[code\]mkdir("/htdocs/uploadfiles/s001/", 0700);\[/code\]That means only the owner of the s001 has access read/write/execute. But I don't know whether or not this is correct and practical.
 
Back
Top