I’ve installed NextCloud on A2hosting (i have root access) and i’ve installed the nextcloud on my computer. After adding some folder i’ve found that the upload was very very slow so i decided to add the folder via ftp directly to the nextcloud files folder. This method was very fast but the files don’t appear in the nextcloud so i’ve searched and found that i could run a command to solve this issue:
sudo -u user php occ files:scan --all
but when i run this command i get this error:
TypeError: Return value of OC\AppFramework\Http\Request::getScriptName() must be of the type string, null returned in /home/***/lib/private/AppFramework/Http/Request.php:796
Stack trace: #0 /home/***/lib/base.php(154): OC\AppFramework\Http\Request->getScriptName() #1 /home/***/lib/base.php(591): OC::initPaths() #2 /home/***/lib/base.php(1068): OC::init() #3 /home/***/console.php(46): require_once(’/home/***/…’) #4 /home/***/occ(10): require_once(’/home/***/…’)
i don’t know if there’s any optimizations that i can so my Nextcloud works faster and the way i can scan the files that i’ve uploaded via ftp.
sorry, i’ve used the “user” in the explanation but i’ve run the command in my computer with “root” and with my username.
if i try with www-data i get the error:
sudo: unknown user: www-data
sudo: unable to initialize policy plugin