File reading and writing PERMISSIONS minor problem

Howdy,

Let’s say I have a directory with some PHP files in it: /home/site.com/run

I want to be able to execute these as PHP from the site index /home/site.com, (I’ve been using include())

But at the same time I want the scripts themselves (the ones in /home/site.com/run) to not be allowed to read and write any file.

I tried CHMOD 111 on the /run directory, and that did indeed stop the scripts reading and writing, but unfortunately it also prevent the site index /home/site.com from accessing them at all.

How can I meet both of these conditions?

Thanks :o

You must write read+ execute permission to user of php (‘www-data’ or indicates in apache.cong)

if you don’t want anyone read this, you must change owner of directory (chown) to www-data and change permission:
chown www-data run/ -R
chmod 500 run/ -R

Sponsor our Newsletter | Privacy Policy | Terms of Service