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

Populate drop down list from table??
Lets say for arguments sake that i have a table which contains the numbers 1 to 10.
How can i get

How to assign JS screen.width to ASP.Net variable
I've got this ASP.net routine that gets the cookie value of the screen width, but now I need to chan

Error: SQL Syntax; Line 1
Code:

<?php require "global_settings.php"; ?>
<title&g

Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with

Embedding flash object in Else statement
This is my first major project in PHP and I'm having some trouble embedding a flash object in an Els

How to sum these output values
Hi

I need sum the month totals
SELECT region_name, area_name ,SUM (CASE WHEN S

Help with usergroups? prolly really quick
So were coding our own forums for a game system we made an we have the users level setup but now I n

Deleting Partners on the Customer Master.
Does SAP handle removing the Partner from Open Sales Orders when a Partner is deleted in the Custome

Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the

Problem Dereferencing
With these types and tables:

CREATE TYPE MANAGER AS OBJECT (
MGR_ID INTEGER,

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