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