dannyb785 Posted July 25, 2008 Share Posted July 25, 2008 Ok, so at the moment, I have my site setup so that when I'm uploading an image to a folder, I do an ftp connect with my username, change the folder to 777, upload the pic, then change the folder back to 711, then disconnect. Thing is, sometimes I'm noticing that a folder or 2 every so often is still set to 777(when I view it in filezilla). So it made me think that perhaps the folder stays at 777 if the script is halted before changing back to 711(or perhaps for some other reason gets changed to 777). So an idea I had was that in my php file that connects to my database(and does all other config details) that maybe I could create a long list of all my folders and set them to 711, no matter what they're currently set to? like: $conn = connect(); // sign in as owner change_perms($conn, '0711', 'photos'); // allow folder to be modified change_perms($conn, '0711', 'thumbs'); // allow folder to be modified etc... ftp_close($conn); The thing is, this would be done every single page, so I figure it might be taking up too many resources. So maybe I should do a cronjob of setting folders to 711 every hour? or maybe every 24 hours? What would you recommend? similar question, is 711 okay to set my folders to? Quote Link to comment 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.