I have a Ubuntu 18.04 LTS running on a rented root server with a snappy installation of Nextcloud.
Until last night everything was great and everything worked. This morning I wanted to access Nextcloud again and I get the message “writing to the “apps” directory is not possible”.
I also get the message that I have permission to view the apps folder.
What I don’t understand, why should something have changed if it worked until last night?
Also I am using the snappy version of Nextcloud. I don’t know much about it, but doesn’t that mean that Snappy does all the setup?
It would be great if you could help me. I need my daily dose of cloud.
Thanks a lot
I cannot tell you what has changed on your server, but I can recommend that you check and correct the access rights of the Nextcloud apps folder on your server. Open a command shell, navigate to the Nextcloud document root directory and make sure that the apps directory is owned by the web server user.
that’s what I’m advised to do right in the web browser. I already tried that, but I’m not sure how to find the correct root directory of Nextcloud.
As I said I use the SNAP variant…
Under /snap/nextcloud/current/htdocs/ I think I found the root directory. But this seems to be read-only.
If I use the command sudo chown www-data ./apps/ I get at least this message.
Thanks a lot
Maybe this is also helpfull.
If I type: nextcloud.occ this is what I get:
Nextcloud is not installed - only a limited number of commands are available
Cannot write into “apps” directory
This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file. See https://docs.nextcloud.com/server/16/go.php?to=admin-dir_permissions
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /snap/nextcloud/18204/htdocs/lib/private/Console/Application.php:166
#0 /snap/nextcloud/18204/htdocs/console.php(96): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /snap/nextcloud/18204/htdocs/occ(11): require_once(’/snap/nextcloud…’)
I had that problem with newer version 21 and the corresponding update to 22.x
My problem was not the permissions of apps folder, but the SELinux configuration/ setting for data folder.