Configuring Exernal Storage Support CLI due to GUI glitch

This seems like a common problem. When trying to configure the a local share through the web GUI, a password prompt pops up but won’t accept the password.

Upon doing some research, a common workaround is to add the shares command line. I did this and it worked fine.

However the next problem I am facing is that I need to be able to share the external storage folder as a share link. “enable share”

I think this will allow me to do it. However I can’t with the password prompt that isn’t working

So I’m trying to figure out the commandline for this
Unless their is a GUI fix

sudo -u www-data php occ files_external:create ‘’ local null::null -c datadir=/media/’ --user=

This worked for me, minus the options
If anyone knows this syntax would be very helpful


I am currently facing the same issue and its quite frustrating. I am able to create the external storage with occ just fine but when I try to do it with the gui on the site it fails out on auth every time and I can’t for the life of me find a command to enable sharing with occ. You would think with it being a “known issue” and a feature that I would think most users use, it would be a high priority for the nextcloud staff to get the gui working correctly instead of having to do “half-assed” work arounds. I love nextcloud but these little annoyances are frustrating.

Which versions are you using?

In your list, this is all local external storage, that normally does not need any authentication (it uses the webserver’s/php user). Or is this for a different backend?

I don’t understand what you are asking. I created a mount in etc/fstab

as far as Nextcloud, it’s the latest version. Fresh install as of last week. Need to share the external storage for public shares

With Local, the web server user (usually www-data) uses direct access to the folder, which in your case was integrated via /etc/fstab.

Because of

you use the user www-data. Can www-data access the directory directly?

sudo -u www-data ls -l /media/your-mountpoint

Maybe post your /etc/fstab settings. Maybe you can test it with a Local-External Storage from normal linux file system not /etc/fstab e.g. /tmp/test owned by www-data.

Everything is mounting and working fine, what I can’t do is create a share link
“Resharing is not allowed”

Trying to figure out how to do this without a GUI. Or in general

You can see on the Local Photos Folder, it works fine. But the External Share doesn’t allow you to share a link. My guess is that box needs to be checked in the External Share options. But due to the password prompt glitch, I can’t use the gui. I have to use the CLI

Which I am sure their is a switch in the syntax. But I don’t know the syntax


Re-check all settings in Administration / Sharing index.php/settings/admin/sharing. Maybe allow for tests all.

I’m pretty sure this is the culpret, but how to I change it via commandline? Lets bit skate around and avoid the issue :slight_smile: