Skip to content

Cannot replace folder with file error message attempting to upload file #16939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andrew951 opened this issue Mar 11, 2025 · 13 comments · Fixed by #16981
Closed

Cannot replace folder with file error message attempting to upload file #16939

andrew951 opened this issue Mar 11, 2025 · 13 comments · Fixed by #16981
Assignees
Labels
s3 AWS S3 Protocol Implementation
Milestone

Comments

@andrew951
Copy link

andrew951 commented Mar 11, 2025

This ticket system is to report bugs and feature requests. For support, visit the help page first.

  • If you have trouble connecting to a server or your login credentials are not valid, try to resolve the issue with the assistance of your hosting service provider. Any such ticket will be closed with a resolution of thirdparty.

Describe the bug
We're able to connect to Amazon S3 with OIDC, but we're unable to write files in 9.1.3. This is working in 9.1.2

To Reproduce
Steps to reproduce the behavior:

  1. Attempt to replace file while connecting with Amazon S3 with OIDC

Expected behavior
File will get replaced successfully

Screenshots
If applicable, add screenshots to help explain your problem.
Error shows Access denied (S3 with OIDC)

Cannot replace folder <path> with file <file>. Please contact your web hosting service provider for assistance

Desktop (please complete the following information):

  • OS: [e.g. macOS] Mac
  • Version [e.g. 22] 9.1.3

Log Files
Please include the log file. You can reach the logging output in Preferences → Connection.

Additional context
Add any other context about the problem here.

@dkocher dkocher self-assigned this Mar 17, 2025
@dkocher dkocher added the s3 AWS S3 Protocol Implementation label Mar 17, 2025
@dkocher dkocher changed the title Cannot Write Files with S3 with OIDC Cannot replace folder with file error message attempting to overwrite file Mar 17, 2025
@dkocher
Copy link
Contributor

dkocher commented Mar 17, 2025

The error message indicates you have a directory placeholder or common prefix with the name path/.

@kwims
Copy link

kwims commented Mar 17, 2025

I have the same issue since 9.1.3 and no problem on 9.1.2. Just trying to upload and it is trying to replace a folder instead of just adding the file according to the message.

Access denied (Amazon S3 XXX)
Cannot replace folder /parent/files/xxx_113_03-03-2025.txt with file xxx_113_03-03-2025.txt. Please contact your web hosting service provider for assistance.

@yashmehta1202
Copy link

I've the same issue raised the bug today. It was working fine since 9.1.2

@dkocher
Copy link
Contributor

dkocher commented Mar 20, 2025

I am unable to reproduce. Please include the log file. You can reach the logging output in Preferences → Connection.

@snowpilot85
Copy link

snowpilot85 commented Mar 21, 2025

Also running into this issue, Desktop
OS: [e.g. macOS] Mac
Version [e.g. 22] 9.1.3

The error message indicated it's trying to overwrite a new file "folder" with the new file. It's treating the not yet uploaded file as a folder.

New filename: "RLA Mastery Implementation Guide K-2nd 8-21-23.docx.pdf"
Cannot replace folder /teacher-resources/rla-mastery/instructional-resources/RLA Mastery Implementation Guide K-2nd 8-21-23.docx.pdf with file RLA Mastery Implementation Guide K-2nd 8-21-23.docx.pdf. Please contact your web hosting service provider for assistance.

@dkocher
Copy link
Contributor

dkocher commented Mar 21, 2025

As a workaround remove the bucket name from Server in your bookmark configuration and instead set it in Path.

@dkocher dkocher added this to the 9.1.4 milestone Mar 21, 2025
@snowpilot85
Copy link

As a workaround remove the bucket name from Server in your bookmark configuration and instead set it in Path.

That worked! Thanks

@dkocher
Copy link
Contributor

dkocher commented Mar 21, 2025

Possible regression from e2aa1ef.

dkocher added a commit that referenced this issue Mar 23, 2025
@dkocher dkocher changed the title Cannot replace folder with file error message attempting to overwrite file Cannot replace folder with file error message attempting to upload file Mar 23, 2025
dkocher added a commit that referenced this issue Mar 24, 2025
dkocher added a commit that referenced this issue Mar 24, 2025
@seaniedan-flwls
Copy link

I can't use this workaround: when you add the credentials, I don't see where to add a path. And I don't have permission to read the top level directory, "/". So I am hoping for a fix in the next version.

@AliveDevil
Copy link
Contributor

On Windows expand the "More options" for "Open Connection", on macOS create a bookmark, then expand "More options".
This discrepancy is #12891.

@seaniedan-flwls
Copy link

Thank you for this Alive: but I have no option on Mac to add a bookmark (it's also greyed out in the menu).

Image

@AliveDevil
Copy link
Contributor

You are on the History/Recent-view - check the clock symbol in the top left corner.
When you switch to the bookmark view, you will be able to create a new bookmark.

@seaniedan-flwls
Copy link

Ah, thank you so much for explaining. That helps a lot (as do the tooltips!). The reason I was confused is because in history view, right clicking shows the history items as 'bookmarks' (see image for the option to 'delete bookmark'). I can't see a way to turn them into real bookmarks that show up on the bookmarks tab.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s3 AWS S3 Protocol Implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants