scooter41 Posted February 26, 2008 Share Posted February 26, 2008 Hi there..... I am just creating some editable image galleries for a client and have the following folder structure: members/ gallery/ girlIDnumber/ All of which are 777 writable. Then under the girlIDnumber he uploads galleries with names such as gallery1 / gallery2 etc etc which he uploads via ftp The script then creates a thumbs gallery, chmod to 777 and writes thumbnails to that folder. However in order for this to work, I have to chmod manually the folder he uploads to get it work, otherwise it gets a permission denied error. I tried putting a chmod command in, to change the folder he uploaded to 777 first, but it states: Warning: chmod(): Operation not permitted in etc etc ..... on line 66 Even though this command works fine on a thumbs folder that the script created and then chmodded? I tried a chmod -r on members as root too, and still no joy? members/ -777 gallery/ -777 girlIDnumber/ -777 gallery1/ <-this is the folder that I can change permissions on? thumbs/ Does anyone have any reasons why this is? I cant really expect to have to chmod the folder manually each time, and there must be an answer Thanks for any help in advance Link to comment https://forums.phpfreaks.com/topic/93070-chmod-not-permitted-for-one-folder-but-is-for-another/ Share on other sites More sharing options...
uniflare Posted February 26, 2008 Share Posted February 26, 2008 instead of chmodding an uploaded folder, could you not create the folder, chmod it, then move the files uploaded to that folder? there must be some sort of incompatibility with uploading a folder and chmodding it in the same script, try waiting for a few seconds in the script. wish i could be more help ive never come across this before. hope this helps, Link to comment https://forums.phpfreaks.com/topic/93070-chmod-not-permitted-for-one-folder-but-is-for-another/#findComment-476870 Share on other sites More sharing options...
scooter41 Posted February 26, 2008 Author Share Posted February 26, 2008 I could create and move the files, that would work actually, as a system created folder seems chmodable (if thats a word) it just seems a shame to do the extra load on the server for something so simple, but I guess at the end of the day its nothing really that major for a server to do... It was just annoying why it wasnt possible to do with just chmod..... thanks for your help, I shall try with this method! Link to comment https://forums.phpfreaks.com/topic/93070-chmod-not-permitted-for-one-folder-but-is-for-another/#findComment-476907 Share on other sites More sharing options...
scooter41 Posted February 26, 2008 Author Share Posted February 26, 2008 ok this method of copying worked great...... trouble is the folder that is left cant be deleted!! So I am stuck in the same position! Hmm... back to the drawing board Thanks so far Link to comment https://forums.phpfreaks.com/topic/93070-chmod-not-permitted-for-one-folder-but-is-for-another/#findComment-477073 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.