Doc #79136 [Opn->Ver]: ssh2_sftp_mkdir affected by umask

From: Date: Wed, 10 Feb 2021 13:27:01 +0000
Subject: Doc #79136 [Opn->Ver]: ssh2_sftp_mkdir affected by umask
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18517@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79136&edit=1 ID: 79136 Updated by: cmb@php.net Reported by: boris at brdaric dot com Summary: ssh2_sftp_mkdir affected by umask -Status: Open +Status: Verified Type: Documentation Problem Package: ssh2 Operating System: Debian Linux PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Indeed, ssh2_sftp_mkdir() behaves like mkdir() wrt. the umask. Previous Comments: ------------------------------------------------------------------------ [2020-01-17 10:27:43] boris at brdaric dot com Description: ------------ --- From manual page: https://php.net/function.ssh2-sftp-chmod --- Please confirm and note/document that permissions for directory created using this function are affected by system umask setting. Test script: --------------- /* Create directory */ ssh2_sftp_mkdir($sftp, '/home/site',0774); # If system umask default is 022, as it's default on most Linux distributions # you will end up with directory that has permission 754 # If you really want permissions set to 0774, you have to use ssh2_sftp_chmod /* Make sure proper permissions are set */ ssh2_sftp_chmod($sftp, '/home/site',0774); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79136&edit=1

« previous php.doc.bugs (#18517) next »