0

I'm a bit new to aws and especially SFTP but I'm trying to set up an EC2 instance with SFTP so I can access it with FileZilla and I've set it up and can copy files from it into my own directories but whenever I try to copy files back to it, I get the error :"Error: /opt/minecraft/server/paper-1.20.4-436.jar: open for write: permission denied"

I haven't set up permissions for it at all and can't find anything online about how to set up any permissions so I'm stuck, any help or indication how to get this working would be great thanks.

edit: I'm logged in as ec2-user and have set up access for session manager using an IAM but am still confused how to set up specific permissions for that user Also I've read this Connect to Amazon EC2 file directory using Filezilla and SFTP but can't get it to work and had to set it up in a different way

1
  • Generally you lo in with the key and your user, you should be able to write to your home directory. If you want to write to another folder you need to set file permissions so you have access. One way is to add yourself to the correct group and give the group permissions. Another way is to give everyone permissions - something like "chmod -R 777 /opt/minecraft". Note that 777 is generally not a good idea and is considered insecure, but it's a easy way to do it.
    – Tim
    Commented Mar 5 at 7:31

0

You must log in to answer this question.