Nextcloud version (eg, 20.0.5): 28.0.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04.3 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.57 (Ubuntu)
PHP version (eg, 7.4): 8.2.14 (CLI)
The issue you are facing:
I have a StorageNotAvailableException error when adding external storage in the admin interface:
StorageNotAvailableException Local storage path does not exist “/media/steve/samsung/”
I have this mounted as:
Filesystem:
/dev/sda1
Mounted on:
/media/steve/samsung
When I try to add /media/steve, I have no issue with mounting this part in the admin interface, but when I try to access the folders beneath this directory, I get a message saying the folder is empty. The permissions on the folder are:
owner: steve
group: steve
I’ve added the www-data user to the steve group and I’ve restarted apache, but no changes. I’m able to add local folders under the /home/steve folder with no issue. I don’t want to change the ownership of the /media/steve/samsung folder, as I don’t think I should have to. This isn’t running in docker as I’ve seen in most of the solutions, so I’m hoping it’s just something that I’m missing in adding this storage.
Thank you,
Steve
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
Go to the admin section of Nextcloud
Click on External storage
Add new storage /media/steve/samsung
Set folder name to Media
Authentication is set to none
Click the checkmark on the right
Red error image appears to the left of the added line with the error message seen below.
The output of your Nextcloud log in Admin > Logging:
StorageNotAvailableException Local storage path does not exist "/media/steve/samsung/"
That’s the ownership. What are the permissions and ownership for each of the following (e.g. from an ls -l [folderName]`):
/media /media/steve /media/steve/samsung
I’m able to add local folders under the /home/steve folder with no issue.
I assume you meant /media/steve?
I don’t want to change the ownership of the /media/steve/samsung folder, as I don’t think I should have to.
The only real requirement from Nextcloud’s perspective is that the OS permits it to do a stat() on the underlying target path - e.g. can lookup some basic data about the folder (e.g. that it exists, it’s content, disk space used, etc.) And, of course, that any files created within share the same permissions.
I’ve added the www-data user to the steve group and I’ve restarted apache, but no changes.
You may need to bump the server, depending on how your services are managed. A simple reload of Apache may not inject the new group membership.