Error in phpMyAdmin after updating to v4.8.0: The $cfg['TempDir'] (./tmp/) is not accessible

前端 未结 20 2709
别跟我提以往
别跟我提以往 2021-01-30 12:50

phpMyAdmin worked fine with v4.7.9. Now after updating to v4.8.0 today (replacing the old phpmyadmin folder against the new one) I\'m getting this mess

20条回答
  •  無奈伤痛
    2021-01-30 13:00

    From the phpMyAdmin documentation:

    $cfg['TempDir']
        Type:   string
        Default value:  './tmp/'
    

    The name of the directory where temporary files can be stored. It is used for several purposes, currently:

    The templates cache which speeds up page loading. ESRI Shapefiles import, see 6.30 Import: How can I import ESRI Shapefiles?.

    To work around limitations of open_basedir for uploaded files, see 1.11 I get an ‘open_basedir restriction’ while uploading a file from the import tab..

    This directory should have as strict permissions as possible as the only user required to access this directory is the one who runs the webserver. If you have root privileges, simply make this user owner of this directory and make it accessible only by it:

    chown www-data:www-data tmp
    chmod 700 tmp
    

    If you cannot change owner of the directory, you can achieve a similar setup using ACL:

    chmod 700 tmp
    setfacl -m "g:www-data:rwx" tmp
    setfacl -d -m "g:www-data:rwx" tmp
    

    If neither of above works for you, you can still make the directory chmod 777, but it might impose risk of other users on system reading and writing data in this directory.

提交回复
热议问题