I notice in the status report that Temporary directory is set to: sites/default/files/tmp but the install routine did not create this directory. Should I set this temporary directory to a different location of do I just create this /tmp in the location specified, what permissions should I give it 0777?

Comments

You should create it.

You should create it. Permissions and location really depend on you needs. I usually create it well outside doc root, for example I create a /temporary and use that (rather than using the /tmp usually already there as part of a standard Linux / Unix install). If no one else has access to your server, then permissions do not matter so much so long as Drupal can write to it. On shared hosting you might make a ../tmp relative to document root. One short answer: yes, create it, make it owned by the Unix user who owns the php process which Drupal runs, and set it to 755. Owner depends on the way you configured the server.

On shared hosting, the hosting company will help you out with this stuff (always use a hosting company who specialises in Drupal, it will save you headaches, not just a host which just has 'Drupal' on its website to attract business).

Hi John, just tried that but

Hi John, just tried that but get the following errors, any suggestions:

    Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org.uk/subdomains/members/tmpdrupal) is not within the allowed path(s): (/var/www/vhosts/mydomain.org.uk/subdomains/members/httpdocs:/tmp) in system_check_directory() (line 2167 of /var/www/vhosts/mydomain.org.uk/subdomains/members/httpdocs/modules/system/system.module).
    Warning: mkdir() [function.mkdir]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org.uk/subdomains/members/tmpdrupal) is not within the allowed path(s): (/var/www/vhosts/mydomain.org.uk/subdomains/members/httpdocs:/tmp) in drupal_mkdir() (line 2338 of /var/www/vhosts/mydomain.org.uk/subdomains/members/httpdocs/includes/file.inc).
    The directory /var/www/vhosts/mydomain.org.uk/subdomains/members/tmpdrupal does not exist and could not be created.
    Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org.uk/subdomains/members/tmpdrupal) is not within the allowed path(s): (/var/www/vhosts/mydomain.org.uk/subdomains/members/httpdocs:/tmp) in system_check_directory() (line 2173 of /var/www/vhosts/mydomain.org.uk/subdomains/members/httpdocs/modules/system/system.module).
    Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org.uk/subdomains/members/tmpdrupal) is not within the allowed path(s): (/var/www/vhosts/mydomain.org.uk/subdomains/members/httpdocs:/tmp) in system_check_directory() (line 2178 of /var/www/vhosts/mydomain.org.uk/subdomains/members/httpdocs/modules/system/system.module).

You should not get this if

You should not get this if you make the temporary folder inside a folder with the same owner, such as ../tmp, though it appears you are. Did you actually create this directory manually on the server before setting it as the temporary directory in the Drupal File System page on the site? If not, I think you should.

If you are on shared hosting you may not be able to manually make a folder /temporary.

If you are not on shared hosting, but have control of the server, you should disable open_basedir http://www.php.net/manual/en/ini.core.php#ini.open-basedir

Well that might be the

Well that might be the problem then. /members id owned by root whereas /members/tmpdrupal is owned by subuser1. Have now changed /members/tmpdrupal to be owned by root same as it's parent directory but still get same error. Ok so how about making both owned by subuser1... nope still same error. Do I need to restart PHP or something inbetween these changes?

Not on shared hosting but on a VPS. Not sure which httpd.conf to edit, I have two:
/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/zz010_psa_httpd.conf

Maybe just found the answer:
httpd.conf does not contain any open_basedir directive
but
zz010_psa_httpd.conf contains

        <Directory /var/www/vhosts/default/htdocs>
        <IfModule sapi_apache2.c>
                php_admin_flag engine on
                php_admin_flag safe_mode on
                php_admin_value open_basedir "/var/www/vhosts/default/htdocs:/tmp"
        </IfModule>
        <IfModule mod_php5.c>
                php_admin_flag engine on
                php_admin_flag safe_mode on
                php_admin_value open_basedir "/var/www/vhosts/default/htdocs:/tmp"
        </IfModule>
        </Directory>

What do I need to change here?

I have noticed a PHP run as

I have noticed a PHP run as setting which is currently set to 'Apache module' but could alternatively be 'fast CGI application' or 'CGI application'.

Is this setting correct, does it make any difference?

It does make a

It does make a difference. Running php as Apache module means for Drupal to be able to execute and write (as the case may be) folders, they should be owned by (or at least accessible to) the user as which Apache runs, often www-data, apache, nobody or something of that kind. Not so if you are running as fcgid. I advise you to leave this alone unless you want to change it for some other reason. The majority of Drupal sites, probably, are on a server where php is run as Apache module, and there are pros and cons but it is what I do currently.

Still as you are on a VPS why not just go ahead with my suggestion of disabling open_basedir. I cannot see how that can be a security risk on your own server?

Whole machine is not mine,

Whole machine is not mine, just a rented VPS, is that still safe to disable open_basedir on?

I am still not exactly sure how to do this, do I add a section to /etc/httpd/conf/httpd.conf ?

<Directory /var/www/vhosts/mydomain.org.uk/subdomains/members/tmpdrupal>
php_admin_value open_basedir none
</Directory>

Or should I change the lines in /etc/httpd/conf.d/zz010_psa_httpd.conf to include the temp directory?

<Directory /var/www/vhosts/default/htdocs>
php_admin_value open_basedir "/var/www/vhosts/default/htdocs:/tmp:/var/www/vhosts/mydomain.org.uk/subdomains/members/tmpdrupal"
</Directory>

Which is the best way to do this.

If no one else has access to

If no one else has access to the VPS it should be safe.

You could the first method. I would just comment it out with a semi-colon in php.ini

;open_basedir =

as it defaults to off (and restart apache for change to take effect).

nobody click here