PDA

View Full Version : Attachments not uploading


RichieBoy67
01-10-2014, 10:16 PM
My clients server does not allow chmod 777 and when using 755 which is max permission I get the following error. This confirms file permissions? Right? Also to confirm this issue I tried moving the attachments to a new directory and I also got the message that the new directory was not writable under both 777 and 755.

----------------

Fatal error:
Could not create file system directory to hold your attachment.Unable to proceed with save while $errors array is not empty in class vB_DataManager_AttachmentFiledata in ..../includes/class_dm.php on line 849
#0 vb_error_handler(256,
Could not create file system directory to hold your attachment.--------------


I am unsure how to serve his attachments without file permission. Is there a way around this? I was under the impression that 755 should work on his server.


His site was hacked some time ago through an older version of Vbseo. My guess is that his host changed the file permissions at this time. I am thinking about moving his attachments to the database but he has many gigs worth.


Thoughts?


:DThanks!:D


Rich

Zachery
01-10-2014, 10:24 PM
You cannot store files, in the file system, if the webserver/php cannot write to the folders. So no, 755 won't be enough.

RichieBoy67
01-10-2014, 10:38 PM
Yeah, that is what I figured. It is just that some servers use 755 instead of 777 so I thought this may have been the case with his server originally.

It is all very confusing because supposedly his attachments were uploading fine before he got hacked. That is why I suspect his host of changing things. He is on a shared server/virtual dedicated and I do not have root access.

Thanks !

Zachery
01-10-2014, 10:42 PM
Those servers normally have php running in a group, or user configuration that allows them to write to those folders. Running PHP as a specific user via fcgi/cgi can add a lot of overhead, but increases security.

Always going to be tradeoffs, The attachment folder should be below the web root, so I don't see a whole lot of harm in having it there.

RichieBoy67
01-10-2014, 11:05 PM
I agree.

I have not encountered any host ever that has set things up this way. It is really a strange set up. His site is hosted on this one account/server and his database is on a different server completely. This sounds like godaddy but this is not the case. This is not just the database being hosted from another server but from a separate account.

The good news though is that the server his database is on has root access I believe so I am thinking I could serve the attachments files from there. This was not my set up. I would just move things over and have them on the root server to make things easier.

This hosting is aruba which I have only worked with maybe twice before and it is just not what I am familiar with. Without having ssh access I just can do barely anything with their panel.

Anyhow, Thanks Zachery!