-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEyEZOD5HVgOpeIJIXlSJfLnnc6wIFAll5CswACgkQlSJfLnnc
6wLWng/+LedS3DzUkqnocusXoESaXBYEWbRkvlIhxsMYA/HsGJf/cHjM+4/RZRnj
T4xYNnst6hqHwcOUI3jItQGPm4PHqrNB9V43NMQa0gJYuXi5iOfi+YNLXMcmYx8m
9ifqmvpNXxhsevl7be/4K0fsjkGefqGF6UQnNtMtPRan8yV3xTe6lF3Hc7xGclAM
PeJl4a82WOII5RrYEpQ6Twa5V2NUswCdhwAAmW+Hi6ygV5IgTc/uaUr4503OYXip
QawWmQW+Us7tq8tEtlqDKrTKgQloyBpSiHBCtg99sBd54GH19d7oRd+8uhyVJJmm
jk9nTeHdU2ZgBaL5cKfRI1aEmolB0uBYXgH9dQvG7HZdRv4w9J8M6jwV9kqttMAG
UNc61b80AlUptwZr0hpZbAqZsz49CRS5+IpT+isF6I6Fug41f+0PbCdOannJChgH
3PXbMVb5FaNxjViDTSbbE0CfElikbK0n+sTBwfKDt2Vyzn+0GJcKBi5TBf4grIfM
MPle8zRZxIidetAjhUzkRak818enuu4/y0p0rHRRoYuMBhKWfAHlu7e9fnYiVNS/
E213zVYosDt99hU2bLu/yvy351wa3wIVuo6k5wY30kE902uLbCGUdeklv8EvN6iA
Aqeer/DEZNHWlVC4VVaQ2JXa8DuyK6+72iyeWRbRSuSHZFxBAk4=
=1izd
-----END PGP SIGNATURE-----
Hi, all.
Sorry for the latence!
Yes, i'm sure all ENV* variables are absolute to the system root.
As explain on the php-fpm.conf, only few directives are relative to be
chroot.
[quote]
(...)
; Per pool prefix
; It only applies on the following directives:
; - 'access.log'
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
; - 'chdir'
; - 'php_values'
; - 'php_admin_values'
; When not set, the global prefix (or /usr/local) applies instead.
; Note: This directive can also be relative to the global prefix.
(...)
[/quote]
I modified the php-fpm.conf_user as:
env[TMP] = /var/www/tmp/$pool
env[TMPDIR] = /var/www/tmp/$pool
env[TEMP] = /var/www/tmp/$pool
(...)
php_admin_value[upload_tmp_dir]=/tmp/$pool
I created the directory /var/www/tmp/$pool, and chowned user_blog:www on
this!
In facts, i was wrong user.
Now, it's run correctly! ;)
Thank you all.
Le 07/26/17 à 01:50, Todd Mortimer a écrit :
> Hi Stephane,
>
> Are you sure that the env[TMP], env[TMPDIR] and env[TEMP] variables are
> supposed to be relative to the real system root, or relative to the
> chroot? If I were to guess, I would bet that php is trying to create a
> file after chrooting itself, and inside the chroot, /var/www/tmp doesn't
> exist. Try setting those env vars to /tmp and see if that works.
>
> Todd
>
> On Tue, Jul 25, 2017 at 09:03:38AM +0200, Stephane HUC "PengouinBSD" wrote:
>> Hi all.
>>
>> I have this error on my,OpenBSD server (6.1) :
>>
>> FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: Unable to
>> create temporary file, Check permissions in temporary files directory.
>> in Unknown on line 0
>>
>> I use nginx+php70_fpm !
>>
>> The php-fpm.conf for the instance:
>>
>> **** file ***
>> [blog.stephane-huc.net]
>> prefix = /var/www
>>
>> user = user_blog
>> group = www
>>
>> listen.owner = www
>> listen.group = www
>> listen.mode = 0660
>>
>> listen = run/php-fpm.$pool.sock
>> listen.allowed_clients = 127.0.0.1
>>
>> chroot = $prefix
>> chdir = /
>>
>> env[HOSTNAME] = $HOSTNAME
>> ;env[PATH] = /usr/local/bin:/usr/bin:/bin
>> env[TMP] = /var/www/tmp
>> env[TMPDIR] = /var/www/tmp
>> env[TEMP] = /var/www/tmp
>>
>> php_admin_value[upload_tmp_dir] = /tmp
>> php_admin_value[upload_max_filesize] = 8M
>> *** EOF ***
>>
>> Rights on /var/www/tmp:
>>
>> $ ls -al /var/www/
>>
>>
>> total 68
>> drwxr-xr-x 17 root daemon 512 Jul 5 04:59 ./
>> drwxr-xr-x 25 root wheel 512 Jul 5 19:50 ../
>> drwxr-xr-x 10 www daemon 512 Jul 9 10:31 .ht/
>> drwxr-xr-x 11 root daemon 512 Jul 9 10:31 acme/
>> drwxr-xr-x 2 root daemon 512 Jun 25 13:51 bin/
>> drwx-----T 16 www daemon 512 Jul 9 10:31 cache/
>> drwxr-xr-x 2 root daemon 512 Apr 1 21:38 cgi-bin/
>> drwxr-xr-x 10 root daemon 512 Jul 9 10:31 conf/
>> drwxr-xr-x 3 root daemon 512 Jun 25 13:48 etc/
>> drwxr-xr-x 12 root daemon 512 Jul 9 10:29 htdocs/
>> drwxr-xr-x 2 root daemon 512 Jun 24 22:59 html/
>> drwxr-xr-x 11 root daemon 1024 Jul 23 00:00 logs/
>> drwxr-xr-x 2 root daemon 512 Jun 28 18:11 modules/
>> drwxr-xr-x 11 root daemon 1024 Jul 25 08:39 run/
>> drwxr-xr-x 10 www www 2048 Jul 9 10:31 tmp/
>> drwxr-xr-x 3 root daemon 512 Jun 24 20:44 usr/
>> drwxr-xr-x 3 root daemon 512 Jun 24 21:17 var/
>>
>>
>> where is the problem?
>>
>>
>> --
>> ~ " Fully Basic System Distinguish Life! " ~ " Libre as a BSD " +=<<<
>> ----
>> <me>Stephane HUC as PengouinBSD or CIOTBSD</me>
>> <mail>bsd@stephane-huc.net</mail>
>>
>
>
--
~ " Fully Basic System Distinguish Life! " ~ " Libre as a BSD " +=<<<
----
<me>Stephane HUC as PengouinBSD or CIOTBSD</me>
<mail>bsd@stephane-huc.net</mail>
No comments:
Post a Comment