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:
- CentOS 5.x amongst LAMP installed.
- proFTPd installed together with configured for virtual users.
- proFTPd Administrator 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 themisc/user_create
subfolder).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.
- Check if sudo is installed:
yum install sudo
- 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
- Ensure proFTPd-admin includes the
create_user
script. Editinclude_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";
- Edit the
create_user.sh
to practise dwelling family directory together with setup right user together with grouping ownerships. (They are included inwards thecreate_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
- 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
- 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
SUBSCRIBE to Our Newsletter
Sign up here with your email address to receive updates from this blog in your inbox.
Pilih Sistem Komentar - The file /etc/sudoers, has the rules that users accept to follow when using sudo command. Edit the