Hey Guys, I need your help. I have a cache directory on in my websites root and the script automatically creates folders in their with cache files. Is there a way to CHMOD 777 all the new folders created in that directory in advance so that every new folder that is created by the script is already 777? Thanks so much
if you need setup it for a particular folder, than u can setup cronjobs for it to run after certain period of time
Hello there, If you chmod 777 folders, your server can be hacked real soon. Use suphp or chown the directory (top level directory) to the apache user, on centos its nobody, on debian or ubuntu its www-data, i highly recommend not to chmod 777. If you dont use suphp, php scripts will run as apache user and if you use suphp php will run under your account user.
Why not set your cache directory to a directory outside of your DocumentRoot, e.g. /home/user/tmp_cache/, then chmod it 1777 ? [Reference]