+6
pureFTP add additional users
Could you add the ability to create additional FTP-users using ajenti?
For example, we have a webcam upload, but we don't want to expose our main web root to this upload user, so we want to create a new user who has only access to a subfolder..
For now, I create the user using the "pure-pw" command, but it gets overwritten when ajenti updates the website config.
For example, we have a webcam upload, but we don't want to expose our main web root to this upload user, so we want to create a new user who has only access to a subfolder..
For now, I create the user using the "pure-pw" command, but it gets overwritten when ajenti updates the website config.
Customer support service by UserEcho
1. Here is an updated version on github: https://gist.github.com/janxb/5e26afdeed3f42a6bdab
2. The process name you have to add in ajenti must not contain spaces. The best name for example is "ftpusers"..
The users are input in format username:password:homepath
I saved the script with corresponding changes to a new directory I created, then added the script under the "processes" tab for the website I want additional FTP users for. This does not work, am I missing something? I have even tried creating the user first in Ajenti, restarting the website/Ajenti/server.
After creating and modifying the script, you have to save (i have saved mine as /usr/local/bin/scripts/add_ftp_users.sh)
The following screenshot may show it better:
Please feel free to make further comments if anything is unclear. :)
Status: Connecting to 46.29.19.59...
Response: fzSftp started, protocol_version=2
Command: open "diak@46.29.19.59" 22
Command: Pass: ************
Error: Authentication failed.
Error: Critical error: Could not connect to server
Status: Disconnected from server
Status: Connecting to 46.29.19.59:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Command: USER diak
Response: 331 User diak OK. Password required
Command: PASS ************
Response: 530 Login authentication failed
Error: Critical error: Could not connect to server
You can also look under the "supervisor" section in the left sidebar if your added process is listed as "running".
#!/bin/bash
? Regardless, it doesn't work.chmod +x add_ftp_users.sh
, hoping it would solve my problems.user@serv019059 /u/l/b/scripts> sudo ./add_ftp_users.sh
Password:
Enter it again:
Error.
Check that [diak] doesn't already exist,
and that [/etc/pure-ftpd/pureftpd.passwd.tmp] can be written.
they: option requires an argument -- 'd'
Do you have a colon or any other special character in one of your ftp user passwords?
And some more thing: What does the last line "they: option requires an argument" mean?
As for "they..." it's the name of my second user.
SET_USERS="diak:sdf2rsdf:/srv/site0 they:sf2rdf:/srv/site1"
I have removed the second option all together but still gives me the first error.
SET_USERS="diak:sdf2rsdf:/srv/site0"
BTW: What operating system are you using?
Thank you for your help!