I have setup ec2 ubuntu server successfully. Able to connect ec2 instance via ftp as well. But that is the default "ubuntu" user and gives control to all system. So I want to create a new user and allow them access to /var/www
folder and they can not see anything else. Even sharing a private key is dangerous. I have been googling for last one day but not able to find any solution. Don't have much linux server knowledge but by following steps, I able to achieve it.
I created one user with password via terminal, allowed set that new user's home dir to /var/www
and tried to connect via filezilla. But could not connect and gives error ECONNREFUSED - Connection refused by server
I don't know what you did to set up ftp, but you probably want to install and configure vsftp. There is a very good summary of steps here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.