This issue involves what suPHP expects/allows and content ownership set via pure-FTPD upon uploading.
Specifically, we use suPHP as is typically recommended.
Interestingly, setting
The fix we use is a fixperms script which cleans up directory and file permissions and sets ownership of files inside
It can be difficult to manually manage waiting for users to contact with confusion to cause the "fix" to be applied.
I've searched a fair bit and cannot seem to find a way to either have suPHP not be so restrictive or have FTP set the file group ownership correctly, or as desired, upon uploading.
Any thoughts?
Version info:
Specifically, we use suPHP as is typically recommended.
public_html
directories are all created as one expects, owned by username:nobody
. However, any files uploaded via FTP to the public_html
directories are also always owned by username:nobody
. By default, suPHP is run in paranoid mode, which means any PHP file uploaded by default kicks a 500 Internal because the user and group are not as expected by suPHP.Interestingly, setting
paranoid_gid_check
from the default true to false in /opt/suphp/etc/suphp.conf
does not change this behavior. Also setting paranoid_uid_check
to false does not help either.The fix we use is a fixperms script which cleans up directory and file permissions and sets ownership of files inside
public_html
to username:username
, although just changing the group ownership to username also works.It can be difficult to manually manage waiting for users to contact with confusion to cause the "fix" to be applied.
I've searched a fair bit and cannot seem to find a way to either have suPHP not be so restrictive or have FTP set the file group ownership correctly, or as desired, upon uploading.
Any thoughts?
Version info:
apache: 2.4.46
apache_php_default_version: 5.6.40-3
apache_php_versions:
- 7.4.9-1
- 7.2.33-1
- 5.6.40-3
- 7.3.21-1
- 7.1.33-2
- 7.0.33-3
bind: 0
clamav: 0.99.2-2
cpanel_and_whm: 11.68.0.12
cpanel_php: 5.6.30-2
dovecot: 2.2.33.2 (d6601f4ec)
easyapache: 4
exim: 4.89-3
horde: 5.2.10
linux_kernel: 3.10.0-714.10.2.lve1.4.74.el7.x86_64
mailman: 2.1.23-10
munin: 0
mydns: 0
mysql: '5.6'
mysql_build: 5.6.38-1
nscd: 2.17-317
nsd: 0
openssh: 7.4p1-21
operating_system_name: cloudlinux
operating_system_version: '7.9'
p0f: 3.09b-1
postgresql: 0
postgresql_build: 0
powerdns: 0
proftpd: 0
pureftpd: 1.0.45
roundcube: 1.2.4-1
rsyslog: 8.24.0-57
spamd: 3.4.1
squirrelmail: 2012.12.09-4