![]() # Define a customized banner (string returned when client connects) # Define a new user having full r/w permissions.Īuthorizer.add_user(FTP_USER, FTP_PASSWORD, FTP_DIRECTORY, perm='elradfmw') # The directory the FTP user will have full read/write access to.įTP_DIRECTORY = "/srv/users/SYSUSER/apps/APPNAME/public/" # The name of the FTP user that can log in. # This must be greater than 1023 unless you run this script as root. # The port the FTP server will listen on. In that file, put the following contents and change the name, password, andĭirectory for the FTP user that are defined near the top of the file: from thorizers import DummyAuthorizerįrom pyftpdlib.handlers import FTPHandler That is, create this file: /srv/users/SYSUSER/ftpserver.py Now, SSH into your server as your app's system user and create aįile named ftpserver.py in the user's home directory. The rest of your steps should be done while logged in as your app's On Ubuntu 14.04, 16.04, and 18.04, use this command: sudo apt-get install python-pyftpdlib On Ubuntu 20.04 and Ubuntu 22.04, use this command: sudo apt-get install python3-pyftpdlib
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |