Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to upload secure-wordpress.1.0.6, and I receive the following error:

Warning: touch() [function.touch]: open_basedir restriction in effect. File(/abs_path/wordpress/tmp/secure-wordpress.tmp) is not within the allowed path(s): (/abs_path/:/abs_path/:/usr/local/lib/php:/tmp/php_upload) in /abs_path/public/www/wordpress/wp-admin/includes/file.php on line 199

Download failed. Could not create Temporary file.

The /wp-content folder and all it's subfolders have 777 permission.

I've added the following two lines to wp-config.php: putenv('TMPDIR='.ini_get('upload_tmp_dir') ); define('WP_TEMP_DIR', ABSPATH .'wp-content/uploads/');

What else should I try?

I am using Wordpress 3.04 in a PHP 4.49 environment.

share|improve this question
You should ask this at wordpress.stackexchange.com – John Conde Feb 8 '11 at 14:35

"open_basedir restriction in effect" means your web host is overly paranoid with security. Find a new web host, and one with php5, too.

And 777 permissions are dangerous. WP never needs more than 755. If you need 777 permissions at that host to do anything, that's another reason to find another host.

And http://wordpress.stackexchange.com is a better place for WP questions.

share|improve this answer
up vote 0 down vote accepted

I actually needed permissions of 2777.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.