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

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
what is wrong with this

Code: [Select]<?php
if ($_SERVER['HTTP_REFERER'])
{

Material Master Update through BAPI - Follow up material not updated
Hi Experts,

I am updating the material master through a custom transaction using the BAPI

VAT
how should I deal with VAT?

if I have a product that costs £5.00 and VAT @ 17.5% (£0.87

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

Table sorting
Hi,

I'm trying to modify the following in order to make the output table sorted alphabeticall

please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, upda

Internal class functions don't seem to get executed.
Hi. Can someone please put me out of my misery on this. I don't write much PHP and this has me baffl

phph within href not showing php if change ? to &
Code: [Select]<a href="<?php echo $puser; ?>?m=<?php=(($m-1)&l

Target costs on Process orders not calculating
Hi All,

We have released standard costs for all the materials. We have also done Goods r

How to show a complete textarea ??
I enter Client Case Notes notes in a textarea field on a PHP form. The field is 5 rows deep and 70 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