Missing upload-tmp or not writable

Nextcloud version (eg, 10.0.2):
Operating system and version (eg, Ubuntu 16.04):
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 5.6):
Is this the first time you’ve seen this error and can you replicate it?:

The issue you are facing:
I am getting the entry in my nextcloud.log

{“reqId”:“z+9KYnHVFdukh1zkxgi0”,“remoteAddr”:“xxxxxxxxx”,“app”:“no app in context”,“message”:“Temporary directory /var/www/nextcloud/data/upload-tmp is not present or writable”,“level”:2,“time”:"2017-01-22T06:19:39+00$
{“reqId”:“59ZZShDRrRI7UkdVsdTK”,“remoteAddr”:“xxxxxxxxx”,“app”:“no app in context”,“message”:“Temporary directory /var/www/nextcloud/data/upload-tmp is not present or writable”,“level”:2,“time”:"2017-01-22T06:20:06+00$
{“reqId”:“C8Ak5nAystse1nRws12t”,“remoteAddr”:“xxxxxxxx”,“app”:“no app in context”,“message”:“Temporary directory /var/www/nextcloud/data/upload-tmp is not present or writable”,“level”:2,“time”:"2017-01-22T06:20:10+00$

when I look in the directory I do not have an upload-tmp dir

do I simply just make one and it all works fine or are there specific permissions that I would need to set for this dir upload-tmo dir as well?

EDIT

so I ran mkdir upload-tmp and it made this

drwxr-xr-x 2 root root 4096 Jan 22 00:30 upload-tmp

I am still getting the error in the log CONSTANTLY.

I am not sure if the permissions or the ownership is wrong or right

I also do not have a tmp location in the config.php if that matters

apply the permissions to your webuser (e.g. “www-data”) by running

chown -R www-data:www-data /var/www/nextcloud/data

and in addition check your php settings.
vi /etc/php/7.0/fpm/php.ini
vi /etc/php/7.0/cli/php.ini

Please adjust the upload_tmp_dir to e.g. your directory:

upload_tmp_dir = /var/www/nextcloud/data/upload_tmp

I have the same error. Directory exist, is set successfully in apache2 + cli php.ini and permissions are:

drwxr-xr-x 2 www-data www-data 4096 Aug 20 01:30 php_upload_tmp

PHP settings are working well also, as seen by phpinfo():

Directive	Local Value	Master Value
...
upload_tmp_dir	/var/tmp/php_upload_tmp	/var/tmp/php_upload_tmp

€: Tested also chmod 777, but same result. Does the /tmp folder also need specific permissions?

€€: Also changing /tmp permissions from 1755 to 1777 does not solve it.

Do you have ‘open_base_dir’ configured in php? If so, was this temp-dir added properly as well?

Sorry for the late reply. Didn’t get any notification about your reply :confused:.

open_basedir is not set in any PHP configuration.

Seems to show the reason:

I figured out that the php-fpm was not seeing the same contents of /var/tmp, because of the systemd.service file utilising PrivateTmp=true

But I do not find systemd.service on my system and couldn’t find out so far how so unset PrivateTmp=true. Is there another way to enable PHP to see files there?