2 Answers
- Newest
- Most votes
- Most comments
0
Hello.
With Lightsail, I think you can transfer files using SFTP instead of FTP.
I hope the steps in the document below will be helpful.
https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-connecting-to-linux-unix-instance-using-sftp.html
0
By Default FTP is disabled in cPanel/WHM.
You can enable it from Home / Service Configuration / FTP Server Selection.
Required FTP application will be installed after clicking on Save Button.
CHoose
answered a year ago
Don't think that the issue is to do with the FTP service as I'm connecting via SSH. I can connect fine via SFTP using SSH... but not as my virtual host's user. That's the issue!
Relevant content
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago

I've tried that but can't get it to work. If I connect as "ec2_user", I do get a connection but don't have permission to access my virtual host's root directory; if I try to connect as the virtual host user, it refuses the connection!
Try setting the directory so that "ec2_user" can access it. First, connect to Lightsail via SSH. After that, try adding "ec2_user" to the directory's owning group.
Thanks. Adding the EC2 user to my virtual host's group has allowed me to connect OK. But when I transfer files using my FTP client, they all transfer under the ownership of the EC2 user! Is there no way of connecting to my WHM instance as the virtual host user?
If you can set up SSH for "virtual host user", you can use SFTP. I'm not very familiar with "WHM", but if the "virtual host user" is the same user as normal Linux, it should be possible to set the SSH key as introduced in the blog below. If you set this up and can connect via SSH, you will be able to transfer files using SFTP. https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server
If the "virtual host user" cannot operate like a normal Linux user, the settings cannot be made, so the only option is to change the file owner using the "chown" command after uploading the file with "ec2_user".