Not connecting to server


I am a new user. Next cloud is setup. When i try to connect via android with app or webdav i get error. the app can login and view the files but i cant edit or add. caldav contact cal and tasks can not sync either, i got 404 error permission denied.

folder permissions are 755 and 750. some files are 644 (in the root of the data folder).

I do have SSL. i have not done anything to nextcloud in regards to this. i assumed it configures SSL its self.

Any help would be grateful.


Sorry to hear you’re facing problems :slight_frown:

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the following as you can (you can cut and paste this into your topic):

Nextcloud version (eg, 10.0.2):
Operating system and version (eg, Ubuntu 16.04):
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 5.6):
Is this the first time you’ve seen this error?:

Can you reliably replicate it? (If so, please outline steps):

The output of your Nextcloud log in Admin > Logging:

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

The output of your Apache/nginx/system log in /var/log/____:

Remember, this information may be requested if it isn’t supplied; for fastest response please provide as much as you can :heart: Feel free to use a pastebin service, otherwise log files can be indented with 4 spaces on each line to present them in a friendlier way on the forum.


I am using the latest version 12.

i have this error message from davroid server:

Nextcloud version 12.0.2
Operating system and version (debian 8
Apache 2
PHP version 7.0.21
Is this the first time you’ve seen this error?:
yes first install fresh setup.

ssl is on but site doesnt use https unles i type https://

Thank you for your help

I see a forbidden error in the log. Have you:

  • Triple checked you’re using the correct password
  • Tried a pre-app password generated from your user profile on the server


The password im using is correct.

The pre app password im not sure about. Is this in next cloud or davdroid?

next cloud app works (from play store) it logs in can read but can not write to files.

so issues with next cloud permissions and davroid.

Thank you

If it can’t write then your permissions aren’t correct. How does the ownership look on your data directory?
Furthermore, can you provide server log files please?


Nextcloud won’t handle SSL automatically, you’ll need to validate the settings are correct in your /path/to/installation/config/config.php file.


I am using DirectAdmin. I enabled lets encrypt from there. I opened the config file it reads the following:

<?php $CONFIG = array ( 'instanceid' => '????', 'passwordsalt' => '?????+GZgRQx03/YJ3h', 'secret' => '??????/Kp', 'trusted_domains' => array ( 0 => 'cloud.????', ), 'datadirectory' => '/home/???/domains/cloud.????', 'overwrite.cli.url' => 'https://cloud.????', 'dbtype' => 'mysql', 'version' => '', 'dbname' => '????', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => '???', 'dbpassword' => '???', 'installed' => true, ); The apache log is hard to find due to direct admin. will keep looking. The permissions should be the owner of the domains. Does Netcloud require www-data user aswell as owner user?

Is my HTaccess ok for data folder ok? :

Generated by Nextcloud on 2017-09-08 02:01:46
line below if for Apache 2.4

<ifModule mod_authz_core.c>
Require all denied
 line below if for Apache 2.2
<ifModule !mod_authz_core.c>
deny from all
Satisfy All
section for Apache 2.2 and 2.4
<ifModule mod_autoindex.c>
IndexIgnore *

Nextcloud requires www-data full stop, chown -R www-data:www-data /path/to/nextcloud/data

Hi thanks,

i get an invalid user message. The server is a dedicated server running debian 8. there seems to be now www user when i list users in terminal

Ok, then whichever user your server uses for apache :slight_smile: try this to find out:

Hi i ran the command.

apache and root come up in the list. so i installed while being root user. this did not work. i su username -s /bin/bash the user who owns access to those sites before i install so the user should be correct

Hmm, OK. If you run top or htop it’ll show you, again, what httpd or apache2 is running against.

Hi Jason,

I did check and the user is “apache” for http and there is no apache2 in the list, If i chown with apache:apache, next cloud on the android ap no longer says i dont have permission, but says eg. “rename could not be completed”.

NC online say " Your data directory is invalid
Ensure there is a file called “.ocdata” in the root of the data directory.".

if i change back the permission to the current user then online works fine but cant rename delete files (as was always the case).

i have also tried root as a user but same issues.

http user says apache
but in the list of “top” there is no apache2 in the list, is this normal?

Also i am using PHP-FPM.

is my host correct:

starting to think its this.