[X] This is a bug, not a question or a configuration issue.
[X] This issue is not already reported on Github (I've searched it).
Bug description
SFTP on a S3-compatible Ceph RadosGW with a prefix works great, but fails when using a bucket policy that restricts the s3:ListBucket action. See an example policy below.
According to the documentation if one does not have the s3:ListBucket permissions a non-existent file gets a 403 status code instead of an 404.
This trips up sftpgo in that it can't upload files into a new file name, copying into an existing filename works fine.
Also directory listings (ls subdir/) do not seem to work, but I have not debugged that.
### What are you using SFTPGo for?
Private user, home usecase (home backup/VPS), Medium business
### Additional info
I would certainly like to fix this myself, but I didn't find where this is coming from. Any hints? I might be able to contribute a pull request.
⚠️ This issue respects the following points: ⚠️
Bug description
SFTP on a S3-compatible Ceph RadosGW with a prefix works great, but fails when using a bucket policy that restricts the
s3:ListBucket
action. See an example policy below.According to the documentation if one does not have the
s3:ListBucket
permissions a non-existent file gets a 403 status code instead of an 404.This trips up sftpgo in that it can't upload files into a new file name, copying into an existing filename works fine.
Also directory listings (
ls subdir/
) do not seem to work, but I have not debugged that.Steps to reproduce
my-path
prefix as usuals3cmd setpolicy my-bucketpolicy.json s3://my-bucket
sftp my-sftpgo
andExpected behavior
SFTPGo version
SFTPGo 2.6.3-cf3e1d3e-2024-11-15T16:52:00Z +metrics +azblob +gcs +s3 +bolt +mysql +pgsql +sqlite +unixcrypt +portable
Data provider
memory
Installation method
Community Docker image
Configuration
This happens with and without
SFTPGO_COMMON__SETSTAT_MODE=1
.Relevant log output