Enable the ftp on ajenti virtual site

You have deploy ajenti-v which included a wordpress blog in it. Now sometime you require to upload a custom script for your website and you used to do it with FTP client. Ajenti-V have include a package such “ajenti-v-pureftpd:all” but usually it wont work properly. Here i share you some solutions found from google https://gist.github.com/janxb/5e26afdeed3f42a6bdab. This script help you create user and enable feature for ftp to your ajenti-v website base on particular directory.

To do it, first of all you deploy package call “ajenti-v-pureftpd:all” from the ajenti-v console.

Next, create a script ajenti_additional_ftp_users.sh directly from your webserver host using nano. Copy and paste below script. Please make changes at SET_USERS=”usernameone:password:/path/to/web/folder”.

[email protected]:/srv$ sudo nano ajenti_additional_ftp_users.sh

#!/bin/bash

SET_USERS="usernameone:password:/path/to/web/folder"

IFS=' ' read -a USERS <<< "${SET_USERS}"

for SET_USER in ${USERS[@]}; do

        IFS=':' read -a USER <<< "${SET_USER}"

        NAME=${USER[0]};

        PASS=${USER[1]};

        DIR=${USER[2]};

        (echo $PASS; echo $PASS) | pure-pw useradd $NAME -u www-data -g www-data -d $DIR

done

pure-pw mkdb                                                                                                                            

# for making supervisord think that process is alive

sleep infinity                                                                                                                            

exit

Save then close it. from the ajenti-v web console click on the website, then manage one of your virtual website. Click on the Processes tab and click ADD to create new processes. Fill in as per below sample.

Command : refer to the script that we have created
Working directory : refer to where to upload

Once completed. click on apply changes. then restart the website and click refresh

You are good to go now and may try using ftp client access to user that you have created.

Loading…

Comments

comments

Rise up and attack the day – Spartan

Handling long queue email in Zimbra part 2