OCC Command "Allow Users To Mount External Storage"

Nextcloud version (eg, 20.0.5): 25.09
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): nginx/1.18.0
PHP version (eg, 7.4): 7.4

The issue you are facing:

When installing from the command line I have successfully enabled external storage.

However I have not been able to figure out how to set these checkboxes via occ.

  • Allow users to mount external storage
  • SMB/CIFS

Does anyone have anything on this?

I am finding plenty of occ stuff related to creating files_external:create for adding external connections on a user account but nothing about turning on the feature itself in the Admin account.

You could check if it’s a app config setting Using the occ command — Nextcloud latest Administration Manual latest documentation

Excellent. That sent me down the correct rabbit hole.

I’ve got this resolved. The solution is to use occ:config:app:set to set each configkey as found in the database as shown here:

image

sudo -u www-data php ./occ config:app:set files_external allow_user_mounting --value="yes"
sudo -u www-data php ./occ config:app:set files_external types --value="filesystem"
sudo -u www-data php ./occ config:app:set files_external user_mounting_backends --value="smb,\OC\Files\Storage\SMB_OC"