rockinaway Posted May 20, 2012 Share Posted May 20, 2012 I basically have a picture uploading system for users. I have two questions: 1) What CHMOD should I use for the folders that are there for uploading files to? Currently it is 755, but I want it to be accessible and safe. 2) When I use the standard mkdir() function to create folders in my main parent folder, the folders don't get created. Is this because my parent folder is CHMOD 755? Thanks Link to comment https://forums.phpfreaks.com/topic/262833-chmod-questions/ Share on other sites More sharing options...
silkfire Posted May 21, 2012 Share Posted May 21, 2012 1. Do you want the pictures uploaded not to be accessible by users? When you upload a file to the server it's stored in a hidden temporary file so don't worry about that. By moving the file from the temporary location to a place the user cannot access it you have control over where the file resides on the server. 2. Are you using Windows? Probably you need to have write access to the parent folder. Link to comment https://forums.phpfreaks.com/topic/262833-chmod-questions/#findComment-1347228 Share on other sites More sharing options...
rockinaway Posted May 21, 2012 Author Share Posted May 21, 2012 1. Well by 'access' what do you mean? I guess the user should be able to manipulate the image i.e. view it and things but nothing much else really 2. So chmod the parent folder to 777? (i'm on shared linux hosting) Link to comment https://forums.phpfreaks.com/topic/262833-chmod-questions/#findComment-1347281 Share on other sites More sharing options...
rockinaway Posted May 22, 2012 Author Share Posted May 22, 2012 any help? Link to comment https://forums.phpfreaks.com/topic/262833-chmod-questions/#findComment-1347647 Share on other sites More sharing options...
silkfire Posted May 22, 2012 Share Posted May 22, 2012 1. There's no way for the user to delete or change the picture any way, why are you worried? 2. Ye, try that. Link to comment https://forums.phpfreaks.com/topic/262833-chmod-questions/#findComment-1347656 Share on other sites More sharing options...
rockinaway Posted May 22, 2012 Author Share Posted May 22, 2012 Fixed it! Turns out I had a small syntax error! Thanks anyway Link to comment https://forums.phpfreaks.com/topic/262833-chmod-questions/#findComment-1347683 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.