Bug #78112 [Opn->Fbk]: tempnam() wrong perms on nfsv4 fs.

From: Date: Fri, 14 Jun 2019 11:46:05 +0000
Subject: Bug #78112 [Opn->Fbk]: tempnam() wrong perms on nfsv4 fs.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221308@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78112&edit=1

 ID:                 78112
 Updated by:         sjon@php.net
 Reported by:        daniele dot aluigi at semplify dot net
 Summary:            tempnam() wrong perms on nfsv4 fs.
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Filesystem function related
 Operating System:   linux
 PHP Version:        7.2.19
-Assigned To:        
+Assigned To:        sjon
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

I cannot reproduce this; the following prints 0600 for me:

php -r "echo substr(sprintf('%o', fileperms(tempnam('/mnt/nfs/',
'z'))), -4);"

maybe your mount or export options are to blame?


Previous Comments:
------------------------------------------------------------------------
[2019-06-05 16:43:12] daniele dot aluigi at semplify dot net

Description:
------------
Wrong behavior using tempnam() on an nfs v4 network filesystem.

Temporary file is correctly created and returned with full path, but with wrong perms: 0000 instead
of 0600, so basically it's not writeable.

Works with the same mount options on the same FS but using nfs v3.




------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=78112&edit=1


Thread (6 messages)

« previous php.bugs (#221308) next »