Add SFTP/SSH user
Go to file
Anthony 36cc410178 Fix permission checks: handle non-root execution for password, SSH config, and Match Group checks 2025-11-04 18:22:11 +08:00
scripts Fix webroot write permissions - ensure ROOT directory has litespeed group ownership and group write permissions 2025-11-04 18:06:28 +08:00
README.md Fix webroot write permissions - ensure ROOT directory has litespeed group ownership and group write permissions 2025-11-04 18:06:28 +08:00
TROUBLESHOOTING.md Add standalone script to fix webroot permissions for existing installations 2025-11-04 18:07:10 +08:00
add-sftp.sh Fix webroot write permissions - ensure ROOT directory has litespeed group ownership and group write permissions 2025-11-04 18:06:28 +08:00
check-sftp-user.sh Fix permission checks: handle non-root execution for password, SSH config, and Match Group checks 2025-11-04 18:22:11 +08:00
debug-sftp.sh Applied fixes to user creation 2025-07-25 01:44:09 +08:00
fix-webroot-permissions.sh Add standalone script to fix webroot permissions for existing installations 2025-11-04 18:07:10 +08:00
manifest.jps Add diagnostic script to manifest and create menu action for user diagnostics 2025-11-04 18:09:11 +08:00

README.md

Version 0.7 Changelogs:

  • Fixed critical password setting bug - passwords were not being set due to variable expansion issue in chpasswd command
  • Added automatic webroot permission configuration - ensures /var/www/webroot/ROOT has litespeed group ownership and group write permissions
  • Created comprehensive diagnostic script (check-sftp-user.sh) for troubleshooting user account issues
  • Added detailed troubleshooting guide (TROUBLESHOOTING.md) with diagnostic commands and solutions

Version 0.6 Changelogs:

  • Implemented separate form for deleting users to avoid requiring password input when deleting
  • Fixed SFTP connection "broken pipe" errors by correcting /home directory permissions (root:root with 755)
  • Fixed malformed "Subsystemsftp" line in SSH configuration
  • Implemented proper chroot jail configuration for SFTP users
  • Added bind mounts for webroot access instead of symlinks
  • Added cleanup for bind mounts when deleting users
  • Implemented structured, multi-level logging system (INFO, ERROR, DEBUG, SUCCESS)
  • Created separate log files for different operations
  • Fixed issue with logs appearing in command output
  • Added validation for user existence before password change or deletion
  • Improved error handling and user feedback throughout the addon

Version 0.5 Changelogs:

  • Replaced Change Password from list of users to input the username and also a field to input the password

Version 0.4 Changelogs:

  • Replaced auto-generated usernames with user-defined usernames
  • Added username validation (3-32 characters, alphanumeric + underscore only)
  • Implemented duplicate username checking
  • Enhanced error handling for invalid username formats
  • Added user-friendly error messages for username validation
  • Maintained backward compatibility with existing user management

Version 0.3 Changelogs:

  • Fixed SSH configuration handling to prevent duplicate Match User entries
  • Implemented idempotent sshd_config modification using pattern matching and deduplication
  • Added atomic configuration updates with proper indentation handling
  • Removed redundant SSH service restarts while maintaining reliability
  • Added configuration validation before applying changes

Version 0.2 Changelogs:

  • Added a submitUnchanged property to allow submitting the 'Add User' form even if the settings haven't been changed.
  • Changed required: true to required: false for the 'Accept User Creation' checkbox
  • Changed the return type to info to prevent storing the previous settings.
  • Added a user listing to the manageUserform.
  • Implemented the removal of a user's directory upon user deletion to maintain an accurate user listing.