Doc #79136 [Ver->Csd]: ssh2_sftp_mkdir affected by umask
| From: | cmb@php.net | Date: | Wed, 10 Feb 2021 15:26:44 +0000 |
| Subject: | Doc #79136 [Ver->Csd]: ssh2_sftp_mkdir affected by umask | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18518@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: Verified
+Status: Closed
Type: Documentation Problem
Package: ssh2
Operating System: Debian Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=e154522a5a4d7927d91b540cec3e9f98e41e9922
Log: Fix #79136: ssh2_sftp_mkdir affected by umask
Previous Comments:
------------------------------------------------------------------------
[2021-02-10 13:27:01] cmb@php.net
Indeed, ssh2_sftp_mkdir() behaves like mkdir() wrt. the umask.
------------------------------------------------------------------------
[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