1-use the following command to install proftpd: sudoapt-getinstallproftpd2-Add the following code in etc/shells (sudogedit/etc/shellstoopenthefile) (in command line mode sudovi/etc/shells ): /bin/false create a/home/FTP-shared directory: cd/hom
1-use the following command to install proftpd:
Sudo apt-get install proftpd
2-Add the following code in etc/shells (sudo gedit/etc/shells to open the file) (in command line mode, sudo vi/etc/shells ):
/Bin/false
Create a/home/FTP-shared directory:
Cd/home
Sudo mkdir FTP-shared
Create a userftp user that can only be used to read ftp. this user does not need a valid shell (more secure), so select/bin/false shell to userftp,/home/FTP-shared as the main directory.
To make this part clearer, I will give the command line for this operation:
Sudo useradd userftp-p your_password-d/home/FTP-shared-s/bin/false
Create a download and an upload directory under the FTP-shared directory:
Cd/home/FTP-shared/
Sudo mkdir download
Sudo mkdir upload
Now let's set the corresponding permissions for them:
Cd/home
Sudo chmod 755 FTP-shared
Cd FTP-shared
Sudo chmod 755 downloading
Sudo chmod 777 upload
3-now, go to the proftpd configuration file:
Sudo gedit/etc/proftpd. conf
Of course, you can edit your own proftpd. conf as needed:
# To really apply changes reload proftpd after modifications.
AllowOverwrite on
AuthAliasOnly on
# Choose here the user alias you want !!!!
UserAlias sauron userftp
ServerName "ChezFrodon"
ServerType standalone
DeferWelcome on
MultilineRFC2228 on
DefaultServer on
ShowSymlinks off
TimeoutNoTransfer 600
TimeoutStalled 100
TimeoutIdle 2200
DisplayFirstChdir. message
ListOptions "-l"
RequireValidShell off
TimeoutLogin 20
RootLogin off