darren-reddick / terraform-aws-transfer

Terraform Module for a custom identity provider for the AWS Transfer for SFTP service.
30 stars 32 forks source link

Possible misunderstanding #25

Open jeffgunderson opened 2 years ago

jeffgunderson commented 2 years ago

Apologies if this is just a simple misunderstanding. I am using your example of username/pass authentication. Using it as-is works as far as authentication to connect via SFTP, but I get permission denied for anything more than that once I'm in like:

Couldn't read directory: Permission denied

What I found that fixed it is changing the target to start with the bucket name:

[{"Entry": "/", "Target": "/sftpbucketxxxxxxxxxxxxxxxxxxxxx"}]

Is this expected and I just misunderstood things?

Thank you so much for the module!

darren-reddick commented 2 years ago

Hi. Yes - thats how it should work. The pattern for the Target is the path in an S3 URL: https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access

The example here shows this: https://github.com/darren-reddick/terraform-aws-transfer/tree/master/examples/public-secrets The README could maybe do with an update to make this more clear. Thanks for the feedback!