FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


upload folder permissions





ammonkc
I've made an app/cms that accepts file uploads (pdfs or images) via a form. I'm not sure what permissions I should give the directory where these files are uploaded to. I read a tutorial online that says "it needs to be 0777". is this correct? I need to be able to create files and delete files from this directory. Oh yeah, I'm running a Linux redhat server.
thanks.
nikolic
If you do not have FTP turned on and you are storing your php files in a virtual directory then you have nothing to worry about. Dont let it have script access though, or view directory. You need to give full permissions on that specific directory to everyone, 777.
ammonkc
actually I do need to have ftp access on that directory also. How do I disable script access and directory view? I tried to disable directory view by making a .htaccess file in the directory with "Option -Indexes" in it. but that doesn't seem to work cause I can still get a directory listing from a browser.
Rhysige
Simplest way to disable directory view would be to add an empty index file in there
Philip
I don't get it.
since, we set folder permission to 777
isn't it mean any people can upload him/her php files to this folder ?

Rolling Eyes
kv
NO. You don't have to set permission to 777. As long as the user who runs your webserver process has write permission to the upload directory, you can upload files.
Philip
kv wrote:

.
NO. You don't have to set permission to 777. As long as the user who runs your webserver process has write permission to the upload directory, you can upload files.
.



So we only set write permisson ?
well, when user want to view their image,
isnt there need read permission ? Question

Question Question Question Question Question
kv
Yes read permission is needed, but only the os user running the webserver. For example if the webserver user is "apache", login to terminal as "apache" and set permission to 500 (read+write for current user). That should do.
Related topics
Problam about google ad code
Uploading Folders using CPanel
How do we install Invision Board manually through cpanel?
CHMOD ?? Help me.. :(
phpBB transfering
uploading files through web browser
chmod /tmp folder - permissions 777????
Help with folder permissions...
Cant Drag files to folder
[Help]Reading images from folder (permissions)
cdpuvbhfzz.com
joomla blues. First time is the worst time.
vBulletin installation: Files upload, Database setup
Changing File and Folder Permissions on Local Computer
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.