Unable to enter maintenance mode, upload media files, or even check status

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: Nextcloud snap
Operating system and version: Ubuntu 16.04
Apache or nginx version: Apache 2.4.18
PHP version: 7.0.33

The issue you are facing: unable to enter maintenance mode, unable to upload media files, unable to do sudo nextcloud.occ status. every action encounters the same error shown below. this started a little over a week ago

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

Steps to replicate it:

  1. in browser or desktop app, try to upload a file
  2. in ubuntu, enter sudo commands for maintenance mode, status, etc

The output of your Nextcloud log in Admin > Logging:

[webdav] Fatal: TypeError: Argument 1 passed to OCA\Files_Trashbin\Expiration::setRetentionObligation() must be of the type string, array given, called in /snap/nextcloud/23027/htdocs/apps/files_trashbin/lib/Expiration.php on line 56 at <<closure>>

 0. /snap/nextcloud/23027/htdocs/apps/files_trashbin/lib/Expiration.php line 56
    OCA\Files_Trashbin\Expiration->setRetentionObligation({auto, 90: ""})
 1. <<closure>>
    OCA\Files_Trashbin\Expiration->__construct(OC\AllConfig {}, OC\AppFramework\Utility\TimeFactory {})
 2. /snap/nextcloud/23027/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 84
    ReflectionClass->newInstanceArgs([OC\AllConfig {} ... }])
 3. /snap/nextcloud/23027/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 101
    OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionClass  ... "})
 4. /snap/nextcloud/23027/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 116
 5. /snap/nextcloud/23027/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php line 414
 6. /snap/nextcloud/23027/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php line 385
 7. /snap/nextcloud/23027/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 163
 8. /snap/nextcloud/23027/htdocs/3rdparty/pimple/pimple/src/Pimple/Container.php line 114
    OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}("*** sensitive parameters replaced ***")
 9. /snap/nextcloud/23027/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php line 114
10. /snap/nextcloud/23027/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php line 407
11. /snap/nextcloud/23027/htdocs/lib/private/AppFramework/DependencyInjection/DIContainer.php line 385
12. /snap/nextcloud/23027/htdocs/apps/files_trashbin/lib/Trashbin.php line 797
13. /snap/nextcloud/23027/htdocs/apps/files_trashbin/lib/Trashbin.php line 337
14. /snap/nextcloud/23027/htdocs/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php line 108
    OCA\Files_Trashbin\Trashbin::move2trash("System information")
15. /snap/nextcloud/23027/htdocs/apps/files_trashbin/lib/Trash/TrashManager.php line 103
    OCA\Files_Trashbin\Trash\LegacyTrashBackend->moveToTrash(OCA\Files_Trashb ... }}, "files/System information")
16. /snap/nextcloud/23027/htdocs/apps/files_trashbin/lib/Storage.php line 192
    OCA\Files_Trashbin\Trash\TrashManager->moveToTrash(OCA\Files_Trashb ... }}, "files/System information")
17. /snap/nextcloud/23027/htdocs/apps/files_trashbin/lib/Storage.php line 118
    OCA\Files_Trashbin\Storage->doDelete("files/System information", "rmdir")
18. /snap/nextcloud/23027/htdocs/lib/private/Files/View.php line 1161
    OCA\Files_Trashbin\Storage->rmdir("files/System information")
19. /snap/nextcloud/23027/htdocs/lib/private/Files/View.php line 350
    OC\Files\View->basicOperation("rmdir", "/System information", ["delete"])
20. /snap/nextcloud/23027/htdocs/apps/dav/lib/Connector/Sabre/Directory.php line 308
    OC\Files\View->rmdir("/System information")
21. /snap/nextcloud/23027/htdocs/3rdparty/sabre/dav/lib/DAV/Tree.php line 183
22. /snap/nextcloud/23027/htdocs/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 295
    Sabre\DAV\Tree->delete("files/clark/System information")
23. /snap/nextcloud/23027/htdocs/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpDelete(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
24. /snap/nextcloud/23027/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php line 474
    Sabre\DAV\Server->emit("method:DELETE", [Sabre\HTTP\Requ ... }])
25. /snap/nextcloud/23027/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php line 251
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
26. /snap/nextcloud/23027/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php line 319
27. /snap/nextcloud/23027/htdocs/apps/dav/lib/Server.php line 320
28. /snap/nextcloud/23027/htdocs/apps/dav/appinfo/v2/remote.php line 35
29. /snap/nextcloud/23027/htdocs/remote.php line 167
    require_once("/snap/nextcloud ... p")

DELETE /remote.php/dav/files/clark/System%20information
from by clark at 2020-09-10T13:47:51+00:00
1 Like

What is your php version?
php -v
Welcome to Nextcloud!

Hi @sturtz_nate , thanks for the reply. When I run php -v I get the following:

1 Like

You do not have php installed
run apt install -y php

Thank you @sturtz_nate, I’ve edited the original post with the updated php version 7.0.33. Unfortunately the condition of my Nextcloud implementation is unchanged.

Ok, thank you

What is the out put of cat /var/log/php7.0-fpm.log and cat /var/log/apache2/error.log also try running systemctl reload apache2

the php fpm log shows its running successfully. apache has no log and the reload command says the apache service is not active

ok, run systemctl status apache2





Could you please copy and paste the output? Also ls -a -o -s /etc/apache2? I think I might know your issue

● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
   Active: failed (Result: exit-code) since Thu 2020-09-10 09:58:25 CDT; 12min a
     Docs: man:systemd-sysv-generator(8)
  Process: 1932 ExecStart=/etc/init.d/apache2 start (code=exited, status=2)

systemd[1]: Starting LSB: Apache2 web serve
apache2[1932]: /etc/init.d/apache2: 46: .:
apache2[1932]: /etc/init.d/apache2: 57: .:
apache2[1932]: ERROR: APACHE_PID_FILE needs
systemd[1]: apache2.service: Control proces
systemd[1]: Failed to start LSB: Apache2 we
systemd[1]: apache2.service: Unit entered f
systemd[1]: apache2.service: Failed with re
systemd[1]: apache2.service: Unit cannot be
lines 1-17/17 (END)...skipping...

● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
   Active: failed (Result: exit-code) since Thu 2020-09-10 09:58:25 CDT; 12min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1932 ExecStart=/etc/init.d/apache2 start (code=exited, status=2)

systemd[1]: Starting LSB: Apache2 web server...
apache2[1932]: /etc/init.d/apache2: 46: .: Can't open /etc/apache2/envvars
apache2[1932]: /etc/init.d/apache2: 57: .: Can't open /etc/apache2/envvars
apache2[1932]: ERROR: APACHE_PID_FILE needs to be defined in /etc/apache2/envvars
systemd[1]: apache2.service: Control process exited, code=exited status=2
systemd[1]: Failed to start LSB: Apache2 web server.
systemd[1]: apache2.service: Unit entered failed state.
systemd[1]: apache2.service: Failed with result 'exit-code'.
systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.


is the screenshot you posted is that all of the apache files?

thats the full output

sorry one moment, is says total 56

your, envvars file is missiing

oh yeah thats all there is in there

The /etc/ apache2 / envvars file holds variable definitions such as APACHE_LOG_DIR (the location of Apache log files ), APACHE_PID_FILE (the Apache process ID), APACHE_RUN_USERS (the user that run Apache , by default www-data), etc.

I am looking for a way to get that back

was that something i was supposed to configure before? i installed using snap a few years ago and that was basically it, but then this issue popped up about a week ago