mcmuney Posted July 13, 2009 Share Posted July 13, 2009 I have chmodded the "photos" directory to be 777. The photos directory contains photos by date, for example: photos\07-10-09 photos\07-11-09 etc Thumbnails are automatically generated in the "thumbs" folder by image magick, for example: photos\07-10-09\thumbs photos\07-11-09\thumbs etc Problem: I'm in the process of switching servers and transferring all older files, from "photos\01-01-08" to "photos\12-31-08", but the issue i'm having is that the thumbs are not being generated because of chmod permissions. I'm having to manually chmod each "thumbs" folder even though the higher level "photos" directory is chmodded to 777. How can I avoid having to manually chmod each and every folder? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/165751-solved-chmod-question/ Share on other sites More sharing options...
trq Posted July 13, 2009 Share Posted July 13, 2009 777's a bit drastic isn't it? Why would you need such relaxed permissions? Anyway, you could set your umask to 000 before doing whatever it is your doing. Quote Link to comment https://forums.phpfreaks.com/topic/165751-solved-chmod-question/#findComment-874430 Share on other sites More sharing options...
J.Daniels Posted July 13, 2009 Share Posted July 13, 2009 chmod -R will recursively set the directory and all files below Quote Link to comment https://forums.phpfreaks.com/topic/165751-solved-chmod-question/#findComment-874580 Share on other sites More sharing options...
BMurtagh Posted July 13, 2009 Share Posted July 13, 2009 Hey, J.Daniels is on the right track. Use the following line: chmod -R 777 /thumbs However, as mentioned before the 777 full permission is quite drastic and would consider lowering those permissions to a more ideal level. Quote Link to comment https://forums.phpfreaks.com/topic/165751-solved-chmod-question/#findComment-874595 Share on other sites More sharing options...
mcmuney Posted July 13, 2009 Author Share Posted July 13, 2009 -What should be the ideal chmod? I have 777 because I allow site visitors to upload photos. I tried 666, but the upload didn't work. -Also, I'm using my ftp software to chmod, where I check read, write and execute, from each of the three groups. I don't have option to enter command. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/165751-solved-chmod-question/#findComment-874631 Share on other sites More sharing options...
J.Daniels Posted July 13, 2009 Share Posted July 13, 2009 The directories would have to be owned by the apache process to lower the permissions. If you can't change the owner, a more secure way would be to store the directory outside of the DocumentRoot tree, and use PHP to read in the images. If you only have access through FTP, a quick google search for recursive chmod ftp client shows that FileZilla supports it. I don't have any experience with how well it works though. Quote Link to comment https://forums.phpfreaks.com/topic/165751-solved-chmod-question/#findComment-874786 Share on other sites More sharing options...
mcmuney Posted July 14, 2009 Author Share Posted July 14, 2009 Thanks JD FileZilla did the trick. Quote Link to comment https://forums.phpfreaks.com/topic/165751-solved-chmod-question/#findComment-875037 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.