Disconnect external storage / change config / cant issue occ have no shell

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 18
Operating system and version (eg, Ubuntu 17.04): Cpanel Webhosting Linux
Apache or nginx version (eg, Apache 2.4.25): ?
PHP version (eg, 7.1): 7.3

The issue you are facing:

I didnt enter the port at external sftp storage conf, but i cant change the parameter in the web-config as there is noch “change” icon.
I cant issue occ commands as it is a webhosting account with only cpanel and file-manager access.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. ownlcloud configure external storage
  2. try to change config
  3. try to make new external storage: no possibility in web config

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


The output of your Apache/nginx/system log in /var/log/____:


I’m sorry but I cannot replicate your problem. It is an easy task to e.g. modify the settings of an external storage under Settings > Personal > External storage. You only have to klick on the tick sign to apply the changes:


Install and use the occ-web app (if necessary)

1 Like

it looks like this for me:

Thank you files_external:delete worked. But now in the Config (Admin account!) I get:

OK wrong menu point, i can now enter new data. thank you

is ip:port possible? ssh doesnt like ip:port but wants -P and my config with ip:port does not work. i
get the red “!”

Log file says
Connection refused …

So I think the port is not possible. In a linux shell i can connect using sftp (on external storage i got a shell). but the command is:

sftp -P xxx xxx@x.x.x.x

i tried to fiddle around a liitle bit and the best i can come up with is to enter ip:port in the field ip, but it “doubles” the port parameter:

“Cannot connect to 448 1x.1x.1x.x:448”

“Cannot connect to 1x.1x.x.x:448. Error 111.”

This posting says it is possible to change the standard port in a php file, but icant find it:

What about reading the documentation?!
BTW, this is the Nextcloud forum, not the ownCloud one :wink:

yes i am on nextcloud. what should i find in the doc?

Answers on questions?!

there is no option to change the port

Hmm, I think you should give it a try again:


maybe you should read the thread instead of giving bullshit advice. it does not work.

You already wrote you used ip:port and it didn’t work, but that’s not a reason for being rude.
You should instead post more details to your setup and maybe screenshots.

j-ed is trying to help you by pointing out which doc to look at. It shows correctly how to add ports (what you seemingly did).

If this does not work for you it might be an issue in your setup or a bug. Both need more information to be diagnosed.

  • What is the actual problem? Still not showing the option?
  • What did you mean by “wrong menu point”? Personal settings instead of system settings?
    As others are not looking over your shoulder they need very detailed info about what is happening to be able to recreate the issue and find the cause of it.
  • What kind of browser do you use? Something out of the ordinary? Any ad blockers active?
  • How is the port doubled? Where do you see this?
  • Can you switch the port on the sftp server to standard port 22 and test again?
1 Like

thx good point, maybe ssh connections are blocked by a security setting. iwill get back to your post when back @the setup but the error indicates imo theres no route to host.

does anyone know in which file the port is given to the sftp routine? i tried changing it in the sftp1 and 2 .php files but no effect?


I have just tried (on Nextcloud 16.0.7, 18.0.1 RC2 and 18.0.1) to access an sftp server using an alternate port in the notation ip:port (xxx.xxx.xxx.xxx:xxxx) with username/password authentication.
It works fine, seems to be a specific issue in your setup.

Did you open the shell and connect from the same machine as the nextcloud setup is located?
Sounds like some firewall/webserver misconfiguration to me.

1 Like

But now I do understand, what puzzled you first (in personal settings):

The UI could be better and there is a bug, too.

  • There is no hint that you are not allowed to add/edit external storage settings and that it is limited to admin users. The configuration field is just empty.

  • The bug (16.0.7 and 18.0.1) is pretty irritating and will lead you to wrong conclusions:
    You can still click the checkmark, which triggers a red flag, although the storage is functional and green in admin settings.

no i didnt, i dont have a shell there, ist a cpanel webhosting account

thanks that was a problem, yes, but i think the admin user got that screen too, i never could find anything to edit those settings after thy were confirmed. but i have occ web now.

p.s.: new thing comes up, i cant login to the server, it says “storage not available”.

does anyone know whete those external storage settings are stored, so i can just deactivate external storage in php?

There are several reasons why you shouldn’t manipulate core files.
If really needed make changes to your database instead.

You should be able to enable/disable apps in this table:

  • oc_appconfig

External storage data can be found in the tables:

  • oc_external_mounts
  • oc_external_config
  • oc_external_applicable

“oc” can be something else, depending on your setup.

Manipulating the database should be a last resort. Be careful!