-->
Proftpd - Practise Private Directories For Each User Account

Proftpd - Practise Private Directories For Each User Account

Proftpd - Practise Private Directories For Each User Account

This post explains how to modify the proFTPd Administrator tool to brand the practise users tool truly practise private directories for each delineate of piece of employment concern human relationship that is created.


Requirements

This characteristic is designed to travel from inside the admin spider web interface together with hence the next has to endure installed:

Configuration

In the config file you lot tin railroad train a script to run every fourth dimension a user is created (a sample script is included inwards the misc/user_create subfolder).
 tool to brand the practise users tool truly practise private directories for each accoun proFTPd - Create private directories for each user accountNote
When nosotros refer to this script inwards the configuration files, nosotros accept to include the absolute path. This document assumes that the proFTPd Administrator tool has been installed inwards /usr/share/proftpd_admin/.

Running the script to modify permissions together with creating dwelling family directories requires root-access from the script. We volition role the sudo tool to hit this.

  1. Check if sudo is installed:
    yum install sudo
  2. The file /etc/sudoers, has the rules that users accept to follow when using sudo command. Edit the sudoers file:
    nano /etc/sudoers
    and add together the next few lines:
    # Cmnd alias specification
     Cmnd_Alias CREATE_USER = /usr/share/proftpd_admin/misc/user_script/create_user.sh
     
     # User privilege specification
     nobody ALL=(ALL) NOPASSWD: CREATE_USER
  3. Ensure proFTPd-admin includes the create_user script. Edit include_config.php:
    nano /usr/share/proftpd_admin/include_config.php
    add the next delineate to the terminate of the $ config ... statements at the transcend of the file:
    $config_createuser_command = "sudo /usr/share/proftpd_admin/misc/user_script/create_user.sh";
  4. Edit the create_user.sh to practise dwelling family directory together with setup right user together with grouping ownerships. (They are included inwards the create_user_example.sh script):
    cd /usr/share/proftpd_admin/misc/user_script/
     mv create_user.sh create_user_old.sh
     cp create_user_example.sh create_user.sh
  5. Now cheque the create_user.sh file:
    nano create_user.sh
    and ensure the file contains the following:
    #!/bin/bash
     USER=$1
     USER_ID=$2
     GROUP_ID=$3
     
     mkdir -p /ftp/$USER
     chown $USER_ID.$GROUP_ID /ftp/$USER
  6. Ensure the safety hasn't been compromised past times running the next commands:
    chown -R root.root /usr/share/proftpd_admin/misc/user_script
     chmod 700 -R /usr/share/proftpd_admin/misc/user_script

References

Blogger
Disqus
Pilih Sistem Komentar

No comments

Advertiser