Jump to content

CHMod not permitted for one folder but is for another?


scooter41

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.