Drupal 4.7.2, latest Acidfree from CVS

A sample of this error is below. The tmp folder has 777 permissions. I can't seem to change the tmp/acidfree folder permissions (750), or look into the folder with FTP. I have an .htaccess file in the tmp directory with the following contents:

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
<IfModule mod_rewrite.c>
RewriteEngine off
</IfModule>

The error is:
The selected file /home/dulra/domains/dulra.org/public_html/tmp/acidfree/imagemanipmyiiT1.jpg could not be uploaded, because the destination is not properly configured.

As you can see, I have set file manager with the full path to the tmp directory. I initially had the path as a relative path ("tmp"), so I just tried changing that back, and when uploading a photo I got functionally the same error as above:

The selected file tmp/acidfree/imagemaniph8ZIYW.jpg could not be uploaded, because the destination is not properly configured.

I suspect this error impacts resizing of photos, but I haven't been able to confirm that.

Comments

frost’s picture

just to clarify, i was getting this error before i got the latest acidfree and the error is still there. so the cause of it isn't in your most recent changes (which btw are really good additions to the functionality).

vhmauery’s picture

It seems like every time I see this error, it is because the filemanager private directory is the problem. If you change your filemanager private directory to be a subdir of your filemanager files directory, do these errors go away?

my setup is like this:
sites/vernon/files
sites/vernon/files/active (with numbered subdirs)
sites/vernon/files/working (with numbered subdirs)
sites/vernon/files/private
sites/vernon/files/private/active (with numbered subdirs)
sites/vernon/files/private/working (with numbered subdirs)

Then I use some httpd configuration magic to reject direct access to the private dir.

frost’s picture

I tried that, but I still get the same error. My setup is now as follows:

Under settings/file manager, I have the following:

public file path: fileManagerFiles
private file path: fileManagerFiles/private

Looking via FTP, I can confirm that I have active, working and numbered directories the same as you describe.

Not sure if this is relevent, but under Admin/Settings then under the General Settings, the File System Settings section, I have:

File system path: /home/dulra/domains/dulra.org/files
Temporary directory: /home/dulra/domains/dulra.org/public_html/tmp
Download method: private

vhmauery’s picture

Oh, and I forgot to mention one key thing. hehe. Your filemanager paths have to be within the drupal system files path.

on the admin/settings page, my file system path is:
sites/vernon/files (same as my filemanager path)

frost’s picture

Ok, but I am concerned about changing my file system path, because of this note on the settings page:

"...Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing."

I've had a look in FTP and there are a lot of files in there - our site's been up a month or so, and we've put a lot of content in during that time.

What do I need to do if I change this ? Is it simply moving the entire directory tree to the new location or is there more to it than that?

vhmauery’s picture

okay, so don't change your file system path, change your filemanager paths. I would think that should be fairly safe. You could test it by copying the filemanager directory to be a subdir of the file system path and then change the settings in admin/settings/filemanager. If it doesn't work, you really aren't out that much anyway because the acidfree stuff isn't working anyway.

shunshifu’s picture

I am having very similiar problems with the video module. From what I've found the directory ownership keeps getting changed somehow.

Hope you figure it out I'm sure it'll help me too.

Thanks

Phil

frost’s picture

okay, so don't change your file system path, change your filemanager paths.

Vernon, thanks, yes I had thought of that too, but unfortunately my File System Path is not in a web-accessible area, ie it is not within the public_html directory in the server's directory tree:
/home/dulra/domains/dulra.org/files

While my FileManager Public File System Path is currently set to be:
/home/dulra/domains/dulra.org/public_html/fileManagerFiles

So if I change the FileManager Public File System path to point to
/home/dulra/domains/dulra.org/files
then it won't be publicly (web) accessible anymore :-(

vhmauery’s picture

It sounds like you have painted yourself into a corner. I would suggest reinstalling, but I am not sure how that would help with your files...

I suppose you could try moving the file system path and see what it does to your site. I just tested it with a SINGLE image.module image uploaded to my site (3 files - large, medium, small) and it had no problems moving. I just moved the files dir and then updated admin/settings file system path to match. You could try it and move it back if you experience problems.

I think the big problem is if you change the images dir on the admin/settings/image page -- it stores that path in the files table, which could cause problems later if you change your mind. But it is a relative path to the file system dir, so you aren't changing that.

vhmauery’s picture

Status: Active » Closed (fixed)
becca08’s picture

I had a similar problem of needing to change the files directory after my site was partially built....happened to find this fix posted in a blog.

Made a backup of site then created the copied my files directory to the new location.
Changed the Site Configuration>file system settings in Drupal to point to the new location.
checked my images and found they were all broken links
Opened Database in PHPmyadmin and went to SQL tab put in this query

UPDATE `files` SET `filepath` = REPLACE(`filepath`, "sites/default/files", "sites/yoursitedomainhere/files")

now it all seems to be working
BTW I am running Drupal 5.3 with CCK image and image galleries modules installed:)

For more info see the site i found the answer on at http://flevour.net/blog/drupal-changing-files-directory-configuration-se...

p.S I am posting this solution on this very old thread in case someone comes across this someday in Google....