[nginx-test] tempdir permission

Maxim Dounin mdounin at mdounin.ru
Fri Oct 21 13:04:55 UTC 2016


Hello!

On Fri, Oct 21, 2016 at 11:44:01AM +0800, 洪志道 wrote:

> Hi!
> 
> I run the following test.
> 
> > cat test.t
> #!/usr/bin/perl
> 
> use warnings;
> use strict;
> 
> use File::Temp qw/ tempdir /;
> 
> tempdir(
>         'nginx-test-XXXXXXXXXX',
>         TMPDIR => 1
>     )
>         or die "Can't create temp directory: $!\n";
> 
> 
> > prove test.t
> 
> 
> > ll -d /tmp/nginx-test*
> drwx------ 2 root root 4096 Oct 20 06:09 /tmp/nginx-test-8ZmZ2FksyP
> 
> 
> The same problem is exist in nginx-test. And I can't pass the test like
> request_id.t.

Start tests under unprivileged user, not under root.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list