You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-10-17 15:09:48

JeanBon
Member
Registered: 2023-10-17
Posts: 18

[Resolved] Can't import new documents - Temporary directory is missing

Hello,

We can't import new document, see the logs :

*394 FastCGI sent in stderr: "PHP message: PHP Warning:  Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/chroot/web/glpi/www) in Unknown on line 0PHP message: PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0" while reading response header from upstream, client: IP, server: glpi, request: "POST /ajax/fileupload.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/fpm.glpi.sock:", host: "glpi", referrer: "url"

GLPI Version : 10.0.6
nginx/1.18.0

Do you have some ideas ?


Thanks,
Regards,

Last edited by JeanBon (2023-11-03 11:19:29)

Offline

#2 2023-10-20 15:13:19

JeanBon
Member
Registered: 2023-10-17
Posts: 18

Re: [Resolved] Can't import new documents - Temporary directory is missing

Hello, UP  please smile

Offline

#3 2023-10-23 13:15:53

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: [Resolved] Can't import new documents - Temporary directory is missing

Somewhere in your PHP config or web server configuration you have the PHP "open_basedir" option set and it doesn't include "/tmp". If you have a custom temporary directory set for GLPI in a "config/local_define.php" or "inc/downstream.php" file, you can comment or remove those entries to have it use the default of "files/_tmp" within the GLPI folder. Or, just add "/tmp" to the option.

https://www.php.net/manual/en/ini.core. … en-basedir


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#4 2023-10-24 16:41:42

JeanBon
Member
Registered: 2023-10-17
Posts: 18

Re: [Resolved] Can't import new documents - Temporary directory is missing

Hello,

in all php.ini, open_dir is not enable.

i found on this files :

Should i add only /tmp?

/chroot/web/glpi**/www/config#  config.db.php

}
// Path for upload storage
if (!defined("GLPI_UPLOAD_DIR")) {
   define("GLPI_UPLOAD_DIR",GLPI_ROOT . "/files/_uploads");
}

// Path for tmp storage
if (!defined("GLPI_UPLOAD_DIR")) {
   define("GLPI_TMP_DIR",GLPI_ROOT . "/files/_tmp");
#   public $allow_datetime = false;
#   public $allow_signed_keys = false;
#   public $use_utf8mb4 = true;
}

Offline

#5 2023-11-03 11:18:20

JeanBon
Member
Registered: 2023-10-17
Posts: 18

Re: [Resolved] Can't import new documents - Temporary directory is missing

Resolved :

/etc/php/7.4/fpm/php.ini
add the path in upload_tmp_dir

Offline

Board footer

Powered by FluxBB