Can't write on external storage

Hi, unfortunately, I cannot write on the external storage in Nextcloud, but I can write on it outside of Nextcloud.

My setup: Ubuntu 18.04 on the server, Nextcloud 15.0.10.

I have a volume on Digital Ocean and I used the configuration “local” in Nextcloud, because it is the same server. It is recognized and shown correctly in Nextcloud, but every write attempt in Nextcloud (browser + client) fails with the error message “forbidden”.

You have to set correct permissions to this folder, check this tread:

Thank you, it seems like your advise there solved the problem.

One more question about it though: I thought I was supposed to see the external storage as a folder. Now it seems that it is connected, but it is no separate folder. How can I checked whether it worked successfully and I have the full volume available in nextcloud?

It is true. First of all you will see Green bubble on the left side - meaning that external storage at least accessible. Then you have to enable user(s) that can work with this external folder. You can set if previews are enabled if user can share content of this folder, or may be it is read only media.
All under Settings–> External Storage’s, or.../index.php/settings/admin/externalstorages

As you can see from my example I mount DokuWiki not under root user folder, but created folder Externals and mount it there as sub-folder. This is how it looks like from the GUI: image

Just enable your user, and do small test: create a file.txt and then delete it. After that you can be sure that you have correct permissions. You will be able to access all sub-folders if OC give you an access (correct permissions and may be no HDD quotes).

I don’t see it as a separate folder anymore. My user has the access right as you described above. The bubble is green. And the volume is connected to the server.

Within nextcloud in the tab “Files”, I see a point “External Storage”. If I click on it, I see my volume. However, if I click on that, I was redirected to the main folder.

Also, when I go through the settings, under “available space”, it doesn’t count the external storage.

Is this local folder? Then NC has a “bug” green bubble will be always there, please double check the path (I made typo last time and had have the same issue).

I double-checked the path, it works fine. I see the green bubble, I even deleted the storage and re-initiated it. It is still not working though. :frowning:

I found out that I accidentally deleted the external storage folder. I recreated it and it works, at least I see the symbol now in the folder icon. However, once I click on it, I get redirected to the main folder of Nextcloud.

Seems as permission problem. Please provide more info:

  1. How you did install the NC: manual, snap, Docker?
  2. Check that NC user has access to your folder. E.g. for manual installation usually you have Apache2 and user www-data, then run to check access:
    sudo -u www-data ls -la /mnt/your/local/folder
    Check if you can see content of the folder and then just try to access 1 particular file:
    sudo -u www-data tail /mnt/your/local/folder/someFile.txt

Where /mnt/your/local/folder is exact path to your external storage that you

  1. I installed it as snap.
  2. That works. The permissions on the server seem to work well, that’s why the problem appears to be Nextcloud-specific.

For snap it is totally different, Try to run following command to added access to external share, you can read explanation in a quoted post:

I have done that already, no change

Can I perhaps reset parts of the settings - without losing the whole installation?

Hello. I used Dockers. But I can not see my external storage drive in ncp server. Could you help me?

Can you please provide more data?
Like OS, nextcloud installation details (also how did you install it, docker, snap, manual?), exact shell output of commands, etc. Otherwise it is very and very complicated to help you.

Using Ubuntu 20 , Nextcloud 22.2 on Digital Ocean.
Created a volume, mounted it. I was able to add it to the UI but unable to write to it.
I ran command below and it fixed the issue

sudo snap disable nextcloud
cd /mnt/volume_..../nextcloud
sudo chown -R root:root .
sudo chmod -R 0770 .
sudo chmod -R 0770 ./*
sudo snap enable nextcloud