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-08-23 08:38:28

148kgBanana
Member
Registered: 2022-02-16
Posts: 12

Missing a temporary folder - After update

Hi, I've recently updated my glpi from the 10.0.2 to 10.0.9 but now I'm having a problem where I can't upload files or images.
In the case of a ticket with an image with will say "Missing a temporary folder" but it will upload the image.
In the case of a document with will say the same but it won't upload it.

It can be because of the glpi.conf? :

<virtualhost localhost:80>
ServerName glpi.xxxx.local

DocumentRoot /var/www/html/glpi

# Redirect configuration for multi-glpi installation
# You can set this value in each vhost configuration
#SetEnv GLPI_CONFIG_DIR /etc/gl:uire all granted

   ErrorLog "/var/log/httpd/glpi_error.log"
   CustomLog "/var/log/httpd/glpi_access.log" combined

   <Directory> /var/www/html/glpi/config>
           AllowOverride None
           Require all denied
   </Directory>
   <Directory> /var/www/html/glpi/files>
           AllowOverride None
           Require all denied
   </Directory>

AliasMatch "/ocsinventory" "/var/www/glpi/ocsinventory"

</virtualhost>

Offline

#2 2023-08-24 09:05:57

talipcakir
Member
From: Istanbul
Registered: 2023-08-23
Posts: 16

Re: Missing a temporary folder - After update

Can you check if there is a record of this situation in the php_errors.log file from the glpi log file?

Last edited by talipcakir (2023-08-24 09:06:07)

Offline

#3 2023-08-24 10:03:58

148kgBanana
Member
Registered: 2022-02-16
Posts: 12

Re: Missing a temporary folder - After update

This's what it gives me:

[18-Aug-2023 08:21:10 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 08:21:28 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 08:21:55 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 08:25:06 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 08:25:26 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 08:28:09 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 08:28:20 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 08:30:05 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 08:30:21 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 08:30:41 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 09:07:49 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 09:25:03 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 09:34:38 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 09:35:07 UTC] PHP Warning:  error_log(/var/www/html/glpi/files/_log/access-errors.log): Failed to open stream: Permission denied in /var/www/html/glpi/src/Toolbox.php on line 599
[18-Aug-2023 09:35:07 UTC] PHP Warning:  Cache directory "/var/www/html/glpi/files/_cache/templates" is not writeable. in /var/www/html/glpi/src/Application/View/TemplateRenderer.php on line 92
[18-Aug-2023 11:25:06 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 11:26:40 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
[18-Aug-2023 11:29:58 UTC] PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0

On access-errors.log I've this as well:

2023-07-13 08:37:40 [38@xxxx.xxxxxxx.local]
User ID: 38 tried to access or perform an action on /glpi/front/ticket.form.php?id=3078&forcetab=Ticket$1 with insufficient rights. Additional information: Missing READ right. Cannot view the item.
	Stack Trace:
		/var/www/html/glpi/src/CommonDBTM.php:6354 displayRightError()
		/var/www/html/glpi/src/CommonDBTM.php:6444 displayAccessDeniedPage()
		/var/www/html/glpi/front/ticket.form.php:259 displayFullPageForItem()

About the permissions I've 755 and the owner is apache

Last edited by 148kgBanana (2023-08-24 10:06:48)

Offline

#4 2023-08-24 10:50:40

talipcakir
Member
From: Istanbul
Registered: 2023-08-23
Posts: 16

Re: Missing a temporary folder - After update

sudo chown -R www-data.www-data /var/www/html/glpi/files
sudo chmod -R 755 /var/www/html/glpi/files

ls -la /var/www/html/glpi/files/

Can you share a screenshot after the last command?

Offline

#5 2023-08-24 11:33:19

148kgBanana
Member
Registered: 2022-02-16
Posts: 12

Re: Missing a temporary folder - After update

It seems I don't have the user www-data.www-data
I'm using Rocky Linux 9

[root@xxxx ~]# sudo chown -R www-data.www-data /var/www/html/glpi/files
chown: usuario inválido: «www-data.www-data»
[root@xxxx ~]# sudo chmod -R 755 /var/www/html/glpi/files
[root@xxxx ~]# ls -la /var/www/html/glpi/files/
total 52
drwxr-xr-x  22 apache apache  4096 ago 18 11:19 .
drwxr-xr-x  24 apache apache  4096 ago 17 08:34 ..
drwxr-xr-x  10 apache apache  4096 ago 18 11:19 _cache
drwxr-xr-x   2 apache apache    24 ago 18 11:19 _cron
drwxr-xr-x   3 apache apache    16 ago 17 08:40 DOCX
drwxr-xr-x   2 apache apache    24 ago 18 11:19 _dumps
drwxr-xr-x   2 apache apache     6 ago 18 11:19 _graphs
-rwxr-xr-x   1 apache apache   356 ago 17 10:14 .htaccess
drwxr-xr-x   2 apache apache    24 ago 17 08:39 _inventories
drwxr-xr-x  23 apache apache  4096 ago 17 08:40 JPG
drwxr-xr-x   2 apache apache    24 ago 17 08:39 _locales
drwxr-xr-x   2 apache apache    24 ago 18 11:19 _lock
drwxr-xr-x   2 apache apache  4096 ago 17 08:53 _log
drwxr-xr-x 147 apache apache  4096 ago 17 08:40 PDF
drwxr-xr-x   4 apache apache    26 ago 18 11:19 _pictures
drwxr-xr-x   3 apache apache    27 ago 18 11:19 _plugins
drwxr-xr-x  93 apache apache  4096 ago 17 08:40 PNG
drwxr-xr-x   2 apache apache    24 ago 18 11:19 _rss
drwxr-xr-x   2 apache apache 36864 ago 24 11:30 _sessions
drwxr-xr-x   2 apache apache     6 ago 18 11:19 _tmp
drwxr-xr-x   3 apache apache    16 ago 17 08:40 TXT
drwxr-xr-x   2 apache apache    24 ago 18 11:19 _uploads
drwxr-xr-x   8 apache apache    66 ago 17 08:40 XLSX

Offline

#6 2023-08-24 11:56:22

talipcakir
Member
From: Istanbul
Registered: 2023-08-23
Posts: 16

Re: Missing a temporary folder - After update

Configuration > General > System > Server
Is there a field in your field that looks wrong?

Offline

#7 2023-08-24 12:48:24

148kgBanana
Member
Registered: 2022-02-16
Posts: 12

Re: Missing a temporary folder - After update

I don't think, other than this warning

For security reasons, SELinux mode should be Enforcing.For security reasons, SELinux mode should be Enforcing.
Web server root directory configuration is not safe as it permits access to non-public files. See installation documentation for more details.
The following directories should be placed outside "/var/www/html/glpi": ‣ "/var/www/html/glpi/files" ("GLPI_VAR_DIR") ‣ "/var/www/html/glpi/config" ("GLPI_CONFIG_DIR") You can ignore this suggestion if your web server root directory is "/var/www/html/glpi/public".The following directories should be placed outside "/var/www/html/glpi":
‣ "/var/www/html/glpi/files" ("GLPI_VAR_DIR")
‣ "/var/www/html/glpi/config" ("GLPI_CONFIG_DIR")
You can ignore this suggestion if your web server root directory is "/var/www/html/glpi/public".
PHP directive "session.cookie_httponly" should be set to "on" to prevent client-side script to access cookie values.PHP directive "session.cookie_httponly" should be set to "on" to prevent client-side script to access cookie values.

Last edited by 148kgBanana (2023-08-24 12:49:31)

Offline

#8 2023-08-29 08:18:36

talipcakir
Member
From: Istanbul
Registered: 2023-08-23
Posts: 16

Re: Missing a temporary folder - After update

sudo chown -R apache:apache /var/www/html/glpi/files
sudo chown -R apache:apache /var/www/html/glpi/config
sudo chmod -R 755 /var/www/html/glpi/files

Offline

#9 2023-08-29 10:45:58

148kgBanana
Member
Registered: 2022-02-16
Posts: 12

Re: Missing a temporary folder - After update

I've done that, the outcome is the same, missing temporary folder.

Offline

Board footer

Powered by FluxBB