This sounds like a really simple, stupid question, but for some reason, my Drupal installation on my MediaTemple dedicated virtual (dv) server doesn't seem to be able to access the files/images/temp directory that is required by image.module.

When I install the module, it creates the files/images directory no problem, but then has trouble creating the temp folder within that (a problem I have not previously encountered on my grid server (gs) account).

For some reason I require root access to create that folder, so I logged in as root and created it, even gave it 777 user permissions, but I continue to get the following error in my Administer -> Site configuration -> Image page

The directory files/images/temp does not exist.

Any advice would be much appreciated.

Thanks,

Alex

Comments

itangalo’s picture

I've had similar problems. (I think I worked around them by changing the default folder for images, or by creating the folders manually.) I would be interested in a more proper solution, though.

//Johan Falk, Sweden

ALT83’s picture

I've tried that, manually creating a folder files/img and then changing the settings.

But that doesn't work, it won't save the change, and gives the following errors.

    * The directory files/images/temp does not exist.
    * The settings have not been saved because of the errors.

Any ideas how to force this through, even with a manual MYSQL edit?

Thanks,

Alex

ALT83’s picture

I found out the solution from MediaTemple tech support.

The folder needs to be created by the user for that domain name and not the root user, otherwise the folder will appear virtually invisible (due to access permissions) to the Drupal installation.

The tech guy changed the user for me, not sure how I'd do it myself though...

atuline’s picture

Yes, I have the same problem.

One would think you could go and create an 'image' directory structure and setup the permissions yourself. Then you would go into image configuration page and change the directory from 'images' to 'image'.

Unfortunately, the module doesn't allow that so we get the 'files/images/temp does not exist' message. As a result, you can't even fix the problem yourself without the assistance of the webhost provider.

Not a very good solution at all.

vjones621’s picture

I just came across the same problem so using my FTP client and renamed the image folder, then created another folder called images, set the permissions, created the temp folder and set the permissions on it.

This seemed to resolve my problem. I too am using a virtual server.

ALT83’s picture

I found my quickest way around it was to have 2 FTP sessions open and an SSH terminal (or you could just use a couple of SSH terminals if you're proficient enough, one as the user for that domain and one as root and SSH as root.

Using root:
- Delete any folders that Drupal does manage to create
- Create a new folder in its place (I used the same name)
- Using SSH terminal type: chown domainusername foldername
That changes the ownership of the new root created folder to your domain's username (as needed for it to be visible by Drupal).

Using your domain's username:
- Change the the permissions to 777 (or whatever it is you need).

That has worked for me in all cases so far - including for image folders, audio folders, even redid all the tmp and files folders etc.

Basically each time I get some kind of perms error I have recreated the folder causing the problem with the above method.

So much more hassle than a (gs), but noticeably faster...

If anyone knows how to reconfigure my (dv) to automatically do this in the same way a (gs) does that would be much appreciated.

Alex

dgtlmoon’s picture

resolved i think, basically the php setup MT has funny issues when you write to /tmp/ (ie: when you do a file upload it looses it), what should happen is when you upload the file lands in /tmp/sdfasd.tmp then it gets copied to the 'real' destination.

so in .htaccess i added

php_value upload_tmp_dir tmp

and created this "tmp" and chmod 777 under the top drupal tree, so it uses the drupal/tmp instead of system /tmp/

providing the perms of that dir are kept, all should be well

dgtlmoon drupal devel and hosting