- Qt 5.12.6
- python 3.7.6
- virtualenv
Setup virtual env
$ [sudo] pip install virtualenv
Create VE with python3
virtualenv -p python3 env
Use created VE
source env/bin/activate
pip install -r requirements.txt
pyside2-uic -x design/login.ui -o design/login.py
pyside2-uic -x design/uploader.ui -o design/uploader.py
python app.py
chmod +x build.sh
./build.sh
First of all, create a user account to use for sftp access. Below command will create user named vinhnx with no shell access.
sudo adduser --shell /bin/false vinhnx
Now, create the directory structure to be accessible by sftp user.
sudo mkdir -p /var/vinhnx/upload
Change the ownership of the files directory to sftp user. So that sftp user can read and write on this directory.
sudo chown vinhnx:vinhnx /var/vinhnx/upload
And set the owner and group owner of the /var/vinhnx to root. The root user has read/write access on this access. Group member and other account have only read and execute permissions.
sudo chown root:root /var/vinhnx
sudo chmod 755 /var/vinhnx
Now edit the SSH configuration file in a text editor
sudo vim /etc/ssh/sshd_config
and add the following settings at end of file.
Match User vinhnx
ForceCommand internal-sftp
PasswordAuthentication yes
ChrootDirectory /var/vinhnx
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no
Save the configuration and restart SSH service to apply changes.
sudo systemctl restart ssh