Einen Überblick über das Administrationstool KeyHelp der Keyweb AG und dessen Download gibt es auf https://www.keyhelp.de

Dieses Forum soll es interessierten Benutzern ermöglichen, sich über KeyHelp auszutauschen und Hilfe bei Problemen zu finden.

temp directory of PHP - nextcloud  [SOLVED]

For questions about the usage of KeyHelp and the configuration of it services.
Antworten
Benutzeravatar
keyhelpuser
Beiträge: 10
Registriert: Sa 13. Mär 2021, 21:56
Wohnort: ...earth
Kontaktdaten:

temp directory of PHP - nextcloud

Beitrag von keyhelpuser »

I have a problem with a temporary folder for PHP. Server specification: KeyHelp 20.3.2 (Build 2131) , Debian 10.8 (64-bit) ,PHP 7.4. The problem concerns Nextcloud which uses s3 storage. Everything works as it should, but I have one error regarding OpenBasedir:

This instance uses an S3 based object store as primary storage. The uploaded files are stored temporarily on the server and thus it is recommended to have 50 GB of free space available in the temp directory of PHP. Check the logs for full details about the path and the available space. To improve this please change the temporary directory in the php.ini or make more space available in that path.

I do not know how to deal with it?! It is possible that configuration: disable_functions blocks to check a specific request by the nextcloud?

OpenBasedir: ##DOCROOT##/www:##DOCROOT##/files:##DOCROOT##/tmp
Assuming that nextcloud is in the directory: /home/user/nextcloud/www/
Benutzeravatar
keyhelpuser
Beiträge: 10
Registriert: Sa 13. Mär 2021, 21:56
Wohnort: ...earth
Kontaktdaten:

Re: temp directory of PHP - nextcloud

Beitrag von keyhelpuser »

When I turn off disable_functions the problem disappears, I just need to find which function from the list

Code: Alles auswählen

dl, disk_free_space, diskfreespace, stream_socket_sendto, proc_get_status, proc_nice, proc_open, proc_terminate, proc_close, popen, curl_multi_exec, pcntl_exprill, pcntl_fork, pcntl_fork, pcntl_fec, pcntl_set, posix_setsid, posix_setuid, posix_setpgid, posix_getpwuid, show_source, highlight_file, syslog, error_log, openlog, define_syslog_variables, apache_child_terminate, apache_setenv, apache_note
is responsible for this message. Very interesting situation, I wouldn't care about this nextcloud message but this problem prevents me from updating nextcloud. Although I will transfer data from S3 storage to my own resources, before doing so, I will be happy to solve this problem for other users. any idea?
tab-kh
Beiträge: 33
Registriert: Do 22. Apr 2021, 23:06

Re: temp directory of PHP - nextcloud

Beitrag von tab-kh »

While I don't use s3 storage in my Nextcloud 21.0.1, I'm also using Debian 10 and PHP 7.4 with it. My guess would be disk_free_space (+ its alias diskfreespace). Anyway, like they say: "Check the logs for full details about the path and the available space". So you should find both the path and the available space in the logs and can double check the available space. When the Nextcloud checks the free space, it might try to use one of the functions mentioned above. So it might even be a non issue, because there could be enough space available in the temp directory, but Nextcloud can't know it. The 50GB are also just a recommendation.

Edit: the problem going away with no functions disabled seconds my speculation. In this case Nextcloud successfully checks the available space and finds enough of it to be satisfied.
Benutzeravatar
keyhelpuser
Beiträge: 10
Registriert: Sa 13. Mär 2021, 21:56
Wohnort: ...earth
Kontaktdaten:

Re: temp directory of PHP - nextcloud

Beitrag von keyhelpuser »

You're right, I deleted disk_free_space from disable_functions and the problem is gone.
I have one more error in the nextcloud logs:

Code: Alles auswählen

Error: is_readable(): open_basedir restriction in effect. File(/home/users/nextcloud//.aws/config) is not within the allowed path(s): (/home/users/nextcloud/www:/home/users/nextcloud/files:/home/users/nextcloud/tmp) at /home/users/nextcloud/www/nextcloud/3rdparty/aws/aws-sdk-php/src/S3/UseArnRegion/ConfigurationProvider.php#134
Benutzeravatar
Alexander
Keyweb AG
Beiträge: 1844
Registriert: Mi 20. Jan 2016, 02:23

Re: temp directory of PHP - nextcloud  [SOLVED]

Beitrag von Alexander »

Your path "/home/users/nextcloud//.aws/config" seems wrong because of the double "/".

Of course one can also update the openbase_dir ...
  • "User Administraion" -> Select the user -> Go into the "PHP" tab -> Edit the open_basedir option by adding ":##DOCROOT##"
... but I would first check the path above and the cause why it seems off.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Benutzeravatar
keyhelpuser
Beiträge: 10
Registriert: Sa 13. Mär 2021, 21:56
Wohnort: ...earth
Kontaktdaten:

Re: temp directory of PHP - nextcloud

Beitrag von keyhelpuser »

Hi, this is my configuration:

Code: Alles auswählen

##DOCROOT##/www:##DOCROOT##/files:##DOCROOT##/tmp
Session files are saved in the tmp directory, as recommended, I changed to:

Code: Alles auswählen

##DOCROOT##
Problem is gone I consider the topic to be resolved . Thank you for your help!

A small note: for other users who will want to use Object Storage from vultr for nextcloud, I recommend that you carefully analyze storage configuration file. Object Storage is currently used by over 300 users. The server works great on the KeyHelp panel,
except DNS, but this problem requires a new forum topic. If anyone has any questions, I am happy to help.
Antworten