Skip to content
This repository has been archived by the owner on Mar 24, 2019. It is now read-only.

ezyatev/userman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synopsis

Script for automating web site deployments on Debian.

Principles are:

  • One domain per user.
  • User can only log in via SFTP and only in the own home directory. It is necessary to create the SFTP user group.
  • Separated database for the user.
  • Separated app for the user.

Installation

  1. Clone project repo.
  2. Create user group for sftp users. For example, 'sftp'.
  3. Change sshd_config file like this:
Subsystem sftp internal-sftp
Match Group sftp
ChrootDirectory %h
ForceCommand internal-sftp
AllowTcpForwarding no
  1. Change settings.py file parameters each plugin.
  2. Make the script executable: sudo chmod a+x userman.py

Usage

./userman.py [options]

Available options:

  • --system - creates UNIX account and allows SFTP access only
  • --apache - creates Apache virtual host config for the specified domain name
  • --mysql - creates MySQL user and database
  • --django-nginx - creates uWSGI and nginx config for Django project

Notes

  • You must have mkpasswd app installed. The fact is that this utility is not available on his own, but seems to comes with the whois package.
  • You must have apache2-mpm-itk module installed to set owner of the PHP process.
  • You must have password for the root user to use --mysql feature.
  • You must have uwsgi, uwsgi-plugin-python and virtualenv installed to use --django-nginx feature.
  • Tested with Apache/2.4+ on Debian 8 only.

Author

Eugene Zyatev ([email protected]).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages