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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

ldap connection
We are using ldap to get user information from the domain controller. It was working before. Recentl

A Few Questions
Hi, I want to ask a few questions that I can't seem to find..

1) I'm creating a "shortcu

line breaks in between fetched file names
Hi,

I have this code:
Code: <?php
if($dir = opendir('files')){
while (($f

Formatting echo from database
So I have a database that stores First and last names, then echos them back to a website, as of now

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which style

LOOPing Problem
Hello All!

The following code loops through the data and displays the data accordingly. My p

passing an array of objects after submit
How do I do this? This is what I have tried and it is not working.

<form method="

Warning: Cannot modify header information - headers already sent by (output sta
Warning: Cannot modify header information - headers already sent by (output started at /home/praylif

extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c

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