Email
Share
Jun 23 2009
Last update:

Selected file could not be uploaded, because destination is not properly configured

Filed under: Content Management Systems » Drupal,

The selected file could not be uploaded, because the destination is not properly configured

Seen this error before? Or seeing it right now and pulling your hair out? This is a common error involving Drupal's filemanager and image modules (acidfree). In particular, this error occurs when the filemanager file directory and Drupal's native file directory conflict. Also of issue is the location and user permissions of your private files directory. If you transition data to another server, and your private files directory is located above root, then you'll need to adjust user permissions.

 

How to get filemanager and acidfree working together happily

Note: If you are running a multisite installation, precede with:

  • sites/www.example.com/...

Browse to admin -> settings -> filesystem and ensure the following settings are in place:

File system path: files
Temporary directory:
files/tmp
Download method:
public

 

 

 

Browse to admin -> settings -> acidfree, scroll to the bottom and check the following box:

Force all new images to be transferred by Drupal

Browse to admin -> settings -> filemanager, and make the following settings:

Public file system path:
files/public
Public file system URL:
http://www.example.com/files/public
Private file system path:
/home/username/private

Important:: You need to recursively (ie. w/ all subfolders and files) CHMOD the private file system path and all its subdirectories to 777.

Voila! You should now be able to import images to acidfree without running into the above error.

Security note: The private file system path should be above your document root, ie. a non-public location. However, if you are still getting the error you may need to relocate the path as described below.

If you are still getting the error

If you are still getting the error, particularly after having transferred to another server, change the private file system path to:

Private file system path: /files/private

Note that it is ideal to have your private directory above the document root, so the public cannot access your private files. The method above moves the private directory into the public tree, therefore it's recommended that you add the following to your Virtual Host settings:

# deny access to private directory
Order Deny,Allow Deny from All

Last Resort

If all of the above fail you may have to delete your photo galleries and re-upload them. When doing this, go ahead and delete the "private" folder, browse to filemanager, it will detect that the folder is not there. Create a new one, CHMOD permissions to 777, specify the path in filemanager settings and save. You should now be able to create albums and upload photos without experiencing the above error.

Your rating: None Average: 2.8 (9 votes)

Your rating: None Average: 2.8 (9 votes)

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Drupal and Apache

I think the core of the problem is the whole way ownership of files (and folders) is handled by Linux. Drupal thinks they have ownership, your hosting provider thinks they do, and you (via your FTP utility) think you do. There needs to be some kind of system that manages and delegates ownership effectively and securely. Almost makes me want to switch to IIS...just kidding.

thanks

it helped!!

Drupal errors

Whew - been using Drupal for some time now and am finally getting to the point where I can run it without running into ten thousand error messages. I suppose that's the price you pay for open source. Then again, this is still less errors than I get with any MS software, lol.

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.