dreamwest Posted March 21, 2008 Share Posted March 21, 2008 Is there a way to automatically chmod files on a server by using cron and htaccess?? Link to comment https://forums.phpfreaks.com/topic/97287-chmod-files-on-a-server-by-using-cron-and-htaccess/ Share on other sites More sharing options...
BlueSkyIS Posted March 21, 2008 Share Posted March 21, 2008 i have a script that chmods all files with a .gif extension in a particular directory every minute via crontab: #!/bin/sh chmod 777 /home/website/public_html/assets/images/products/*.gif that's just the script. i assume you know how to use crontab. Link to comment https://forums.phpfreaks.com/topic/97287-chmod-files-on-a-server-by-using-cron-and-htaccess/#findComment-497845 Share on other sites More sharing options...
dreamwest Posted March 21, 2008 Author Share Posted March 21, 2008 is this a perl script or can i use it in htaccess?? Link to comment https://forums.phpfreaks.com/topic/97287-chmod-files-on-a-server-by-using-cron-and-htaccess/#findComment-497847 Share on other sites More sharing options...
BlueSkyIS Posted March 21, 2008 Share Posted March 21, 2008 htaccess can't chmod files. not sure what you mean by that. this is a shell script. modify it as needed, save it in a file with a .sh extension (i call mine chmod.sh) and have crontab run it whenever you want. Link to comment https://forums.phpfreaks.com/topic/97287-chmod-files-on-a-server-by-using-cron-and-htaccess/#findComment-497872 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.