Add "no free space checking" in external storages configuration
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Is your feature request related to a problem? Please describe.
When creating an external storage that points to an area with no free space, users get the "Your storage is full , files can not be updated or synced anymore !" message.
The problem is that this message makes no sense when the target area is read-only (user can't add/modify files, even with free space).
The same problem applies when "read-only" is selected in external storage configuration.
Describe the solution you'd like
- nextcloud should not generate the "full" message for directories that are not writable, but a more adapted message (being not writable is more important than being full)
- nextcloud should not generate the "full" message for storages configured with "read-only" checked (it should not check free space at all, btw)
- maybe external storage configuration should include a "do not check for free space", because in some cases storage can be "strange" and not reliable for metadata such as free space (i.e. some FUSE mountpoints)
Describe alternatives you've considered
At this time I patched lib/private/Files/Storage/Local.php so that free_space() returns not empty for not writable path, in order to prevent disturbing messages to users.
Additional context
The problem arise with a backup external storage: an incremental backup system is used on files, and it allows to navigate back in time via a FUSE mountpoint.
This mountpoint is readonly, with 0 free space. The external storage is configured with "read-only" checked and "allow sharing" unchecked.
Each time a user go inside this storage ("/…/backups/$user" → "Backup") the "full" message appears.
Note: target directory is automounted.
Regards.
PS: my initial post on help.nextcloud.com → https://help.nextcloud.com/t/prevent-storage-full-on-external-storage/66578 (and suggestion to open an issue here)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/private/Files/Storage/Local.php and trace how free_space() results are used for external storages and read-only configurations. Review the external storage configuration path mentioned in the issue. Done means read-only or non-writable targets no longer produce a misleading full-storage message, with an opt-out for unreliable free-space checks if supported by the design.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100