Public/Private folder configuration non-obvious

Created on 25 August 2023, 10 months ago
Updated 6 December 2023, 7 months ago

Problem/Motivation

When configuring S3FS, the Public Folder option has the following description: "The name of the folder in your bucket (or within the root folder) where public:// files will be stored." This field is not marked as required, so the user will expect it to be treated much like the Root Folder setting. That is, if blank it will assume you mean to use whatever the Root Folder is.

This is not what happens. Instead, the module will silently insert "s3fs-public" and add confusion to the setup. This is exacerbated when converting an existing site.

Steps to reproduce

Configure S3FS without setting the Public Folder option.

Proposed resolution

Simplest solution would be to add the following to the Public Folder description: "If blank, 's3fs-public' will be used." A similar thing can be added for the Private Folder.

A complex solution would be to use the fallback to the root folder as described above, although I'm sure there's a good reason for defaulting to 's3fs-public' I'm unaware of. The small update to the description would be enough.

Remaining tasks

Create patch.

User interface changes

Changes to setting form field descriptions.

API changes

None.

Data model changes

None.

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States socketwench

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @socketwench
  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    Moving this to 8.x-3.x as this field does not exist in 4.x.

    A complex solution would be to use the fallback to the root folder as described above, although I'm sure there's a good reason for defaulting to 's3fs-public' I'm unaware of.

    2 reasons I can think of why we wouldn't want to do a fallback to the root folder are:

    • Avoiding cross scheme file access, originally this would have been just to avoid having public://test.txt overwrite s3://test.txt but after SA-CONTRIB-2022-057 it has taken on a more significant role.
    • Providing a method for s3fs to know what paths belong to each scheme. In 3.x the s3fs_file table uses the URI not a bucket path to store file metadata, during a cache refresh we need to be able to map the correct scheme based only on the location in the bucket.

    Adding the text appears to be a reasonable change to make it self documenting.

  • Status changed to Needs review 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    Opened MR. Instead of changing the description text I propose that we just populate the field with the default value. This can avoid a translation nullification.

  • Status changed to Fixed 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cmlara
    • cmlara β†’ committed a41cd5c6 on 8.x-3.x
      Issue #3383406 by cmlara, socketwench: Public/Private folder...
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024