Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions error #9004

Closed
Qballl opened this issue Mar 27, 2018 · 2 comments
Closed

Permissions error #9004

Qballl opened this issue Mar 27, 2018 · 2 comments

Comments

@Qballl
Copy link

Qballl commented Mar 27, 2018

Steps to reproduce

  1. Install nextcloud server
  2. Set nextcloud install file permission to 777
  3. Set data dir permissions to 0770

Expected behaviour

Should work

Actual behaviour

Error from the web page
Your data directory is invalid Ensure there is a file called ".ocdata" in the root of the data directory. Cannot create "data" directory This can usually be fixed by giving the webserver write access to the root directory.

Server configuration

<?php $CONFIG = array ( 'instanceid' => 'ocfkycl0lag1', 'passwordsalt' => 'tJLOlyeHDkCYD9SQD789087ZwIj9IK', 'secret' => 'FktSsMCCJaXrK1PfqcFsCWfTfwhv+TOkTj1GeNj42dc8qz1l', 'trusted_domains' => array ( 0 => 'spidery-mallard-0627.dataplicity.io', ), 'datadirectory' => '/mnt/clouddrive', 'overwrite.cli.url' => 'https://spidery-mallard-0627.dataplicity.io/nextcloud', 'dbtype' => 'mysql', 'version' => '13.0.1.1', 'dbname' => 'nextcloud', 'dbhost' => 'localhost:3306', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'oc_mine3', 'dbpassword' => '39vN5SR6o9Ch2SeFAyl9cpqX1cGSdk', 'installed' => true, );
Operating system:
Latest version of Raspbian
Web server:
Apache
Database:
MySQL
PHP version:
7.0
Nextcloud version: (see Nextcloud admin page)
13.0.1

Where did you install Nextcloud from:
https://download.nextcloud.com/server/installer/setup-nextcloud.php

502 Bad Gateway nginx

ouput of sudo -u www-data php occ app:list
`Your data directory is invalid
Ensure there is a file called ".ocdata" in the root of the data directory.

Cannot create "data" directory
This can usually be fixed by giving the webserver write access to the root direc tory. See https://docs.nextcloud.com/server/13/go.php?to=admin-dir_permissions

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/html/nextcloud/lib/pri vate/Console/Application.php:148
Stack trace:
#0 /var/www/html/nextcloud/console.php(89): OC\Console\Application->loadCommands (Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Con sole\Output\ConsoleOutput))
#1 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')
`

@MorrisJobke
Copy link
Member

Your data directory is invalid Ensure there is a file called ".ocdata" in the root of the data directory. Cannot create "data" directory This can usually be fixed by giving the webserver write access to the root directory.

Looks like the data dir is not owned by the web server user/group. Try this and then it should work.

For further question on how to set it up please ask in the forums: https://help.nextcloud.com

@Qballl
Copy link
Author

Qballl commented Apr 3, 2018

What do I need to try I've tried setting the owner as the web server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants