There is a previous thread regarding a similar issue that is marked "solved," but I'm having problems with this after the supposed update fixed it, so I'm starting my own thread.
The issue is that when I upload folders and files via sFTP the folders are set with the permissions 775 instead of 755, and files intermittently get permissions of 664 instead of 644.
If I create a folder or file with cPanel's File Manager, the permissions are correctly set. If I upload folders and files with regular FTP, the permissions are correct.
The problem with incorrect permissions for folders and files uploaded with sFTP occurs both for sites using suPHP and those using PHP-FPM. As a test, I set all sites to PHP-FPM, uninstalled suPHP using EA4, restarted sshd, and still the problem with the folder and file permissions occurred.
My environment is:
The relevant section of /etc/profile on the server is:
I am on a Linux box running 4.12.10-1-ARCH, and I have confirmed that the folder and file permissions on my machine are set to 755 and 644, respectively, so it's not the permissions of my source files that is causing the issue.
The issue is that when I upload folders and files via sFTP the folders are set with the permissions 775 instead of 755, and files intermittently get permissions of 664 instead of 644.
If I create a folder or file with cPanel's File Manager, the permissions are correctly set. If I upload folders and files with regular FTP, the permissions are correct.
The problem with incorrect permissions for folders and files uploaded with sFTP occurs both for sites using suPHP and those using PHP-FPM. As a test, I set all sites to PHP-FPM, uninstalled suPHP using EA4, restarted sshd, and still the problem with the folder and file permissions occurred.
My environment is:
Code:
/etc/redhat-release:CentOS release 6.9 (Final)
/usr/local/cpanel/version:11.66.0.18
/var/cpanel/envtype:standard
CPANEL=release
Code:
if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then
umask 002
else
umask 022
fi