fopen() security


Posted on 16th Feb 2014 07:03 pm by admin

As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw enabled for the php group, so that fopen() can acces the Dir to write to it.

When I try to write to the Dir that has permissions 666 I get the error "Permission Denied". If I try to write to the Dir and the permissions are set to 777 read/ write/ecexute for every one everything works as intended and fopen() write to the dir normally.

My question:
Why does a folder have to be executable for php to write to it using fopen()?

(using up to date versions of Lamp on Debian Lenny 64-bit)

No comments posted yet

Your Answer:

Login to answer
344 Like 9 Dislike
Previous forums Next forums
Other forums

Deleting a record php
Attempting to setup delete a record page. The below code I put together doesn't seem to work.

images aren't rendering
I'm trying to call a JPG file from within PHP (in an effort to hide the actual JPG folder). The imag

Parse Error
Hi Guys,

I have a function in my class which returns a string link variable. The problem is i

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

MySQL Does not UPDATE- SQLString Problem
vb Syntax (Toggle Plain Text) 1. SQL = "UPDATE sampletable SET column1 = 'C1sample1'"

Passing PHP variables from one page to another
Hello-

I'm having trouble figuring out how to transport a variable from one php file to anoth

displaying email without attracting a ton of spam
Hello,

this is maybe the wrong place to ask.
How would you display an email address on a w

Calling a Procedure with IN & OUT Parameters
Hello,

I usually call my procedures using the following way

declare variable e

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Web Host List
Here is a list of web hosts that offer PHP and MySQL. It is no where near a full list, but it is mos

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash