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

Need some ideas as to how to go about sorting this array...
Here's how the array's are created..

Code: <?php
while ($x = readdir($dp)) {

How to get variable value on next page
Hello friends
i am working on payentry page ..there i have this code.........

sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is somet

PHP - HTTP Digest Authentication - Understanding Code Help
Hi Everyone,

This is my first time on your website and please excuse if I am asking silly que

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

Redirect not working after making a POST/GET
Hi Everyone,

I am a novice in PHP. Here I have 2 pages, one page with a textbox and button an

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

PHP Thumbnail Creation
Ok so i use this function to create thumbnails:

Code: function createthumb($name,$filename,$n

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

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

I have a customer

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