qskypro Posted August 12, 2011 Share Posted August 12, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/244573-file-reading-and-writing-permissions-minor-problem/ Share on other sites More sharing options...
trq Posted August 12, 2011 Share Posted August 12, 2011 You need to set the permissions on the files you DONT want to write to, not the scripts that may write them. Quote Link to comment https://forums.phpfreaks.com/topic/244573-file-reading-and-writing-permissions-minor-problem/#findComment-1256277 Share on other sites More sharing options...
qskypro Posted August 12, 2011 Author Share Posted August 12, 2011 You need to set the permissions on the files you DONT want to write to, not the scripts that may write them. Ahah! I like it. Thanks a lot, I'll give it a shot. Quote Link to comment https://forums.phpfreaks.com/topic/244573-file-reading-and-writing-permissions-minor-problem/#findComment-1256279 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.