Chrooted SFTP access also for suEXEC (mod_fcgid) sites

create_vhost.sh:
- suEXEC (mod_fcgid) sites get the same chrooted SFTP setup as static
  suEXEC sites: web base directory root:root 755, DocumentRoot owned by
  suEXEC user/group, SFTP group membership, sshd and chroot path checks.
- SFTP group: use $SFTP_CHROOT_GROUP if it exists, otherwise 'sftpusers'
  (if exists). If neither exists, skip that step (group is no longer
  created).

fix_sftp_site_permissions.sh:
- Also handle active '*.suexec' vhosts. PHP files (*.php, *.phtml,
  *.php5) are not touched there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrisandClaude Opus 5.5 committed 2026-11-16 16:31:58 +01:00
1 parent 76f0fe1a7a
commit fec60403d1
3 files changed
+117 -47

No files matched your search

+6 -2
View File
@@ -73,8 +73,12 @@
# -
#CREATE_SYMLINK_WEB_BASE_DIR=
# - Group for chrooted SFTP users (vhost type "static site with suEXEC
# - (chrooted SFTP access)").
# - Group for chrooted SFTP users (vhost types "suEXEC (using mod_fcgid)"
# - and "static site with suEXEC (chrooted SFTP access)").
# -
# - The suEXEC user is added to this group, if it exists. Otherwise it is
# - added to group 'sftpusers' (if exists). If neither group exists, the
# - user is not added to any SFTP group. (The group is not created.)
# -
# - sshd must restrict members of this group, i.e. at the end of
# - /etc/ssh/sshd_config: