Nextcloud client cannot upload - error

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:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

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 (eg, 12.0.2): 17.0.3
Operating system and version (eg, Ubuntu 17.04): server: raspbian GNU/Linux 10 (buster), client Arch (up-to-date)
Apache or nginx version (eg, Apache 2.4.25): Apache2.4.38
PHP version (eg, 7.1): PHP Version 7.3.11-1

The issue you are facing:
When creating a new directory on my client, the Nextcloud client application says "Not allowed because you don’t have permission to add sub folder to that folder USB/dirA/dirB/tmp_test even though the directory USB/dirA & USB/dirA/dirB is set to permissions 777 on the server. The directory is located on external storage mount and which is mounted to /mnt/usb/. In the Nextcloud admin interface under External stirage, I have the following:
Folder name: USB
External storage; local
Authentication: None
Configuration: /mnt/usb
Available for: my user | admin(group)
Under Advanced settings:
Enable previews [checked]
Enable sharing [unchecked]
Check for changes : Once every direct access
Compatibiity with Mac NFD encoding (slow) [unchecked]
Read only [unchecked]

Is this the first time you’ve seen this error? (Y/N): Y (am a relatively new user)

Steps to replicate it:

  1. Create a new sub directory in Next cloud directory where external drive is mounted (on client) ~/Nextcloud/USB/dirA/dirB/tmp_test/
  2. Dir remains unsynced (verify on web interface & little icon that appears next to dir icon (in dolphin, plasma))
  3. Selecting "Force sync now’ in Nextcloud client, displays multiple errors that read “…/path/to/file: Not allwed because you don’t have permission to add subfolders to that folder”

The output of your Nextcloud log in Admin > Logging:

[updater] Info: \OC\Updater::resetLogLevel: Reset log level to Warning(2)

GET /nextcloud/core/ajax/update.php?requesttoken=etU3OQRetd0xJX3PIeNt%2BFhRiOSd0cjv1lfsKbVZoDk%3D%3ATrR%2Bb0M2z7dTfAf9Rdc8lAAnwdHcmvnEkyKkT%2FFymHI%3D
from 192.168.1.1 at 2020-02-02T18:01:18+00:00
[updater] Info: \OC\Updater::maintenanceDisabled: Turned off maintenance mode

GET /nextcloud/core/ajax/update.php?requesttoken=etU3OQRetd0xJX3PIeNt%2BFhRiOSd0cjv1lfsKbVZoDk%3D%3ATrR%2Bb0M2z7dTfAf9Rdc8lAAnwdHcmvnEkyKkT%2FFymHI%3D
from 192.168.1.1 at 2020-02-02T18:01:18+00:00
[updater] Info: \OC\Updater::updateEnd: Update successful

GET /nextcloud/core/ajax/update.php?requesttoken=etU3OQRetd0xJX3PIeNt%2BFhRiOSd0cjv1lfsKbVZoDk%3D%3ATrR%2Bb0M2z7dTfAf9Rdc8lAAnwdHcmvnEkyKkT%2FFymHI%3D
from 192.168.1.1 at 2020-02-02T18:01:18+00:00: 
[updater] Info: \OC\Updater::finishedCheckCodeIntegrity: Finished code integrity check

GET /nextcloud/core/ajax/update.php?requesttoken=etU3OQRetd0xJX3PIeNt%2BFhRiOSd0cjv1lfsKbVZoDk%3D%3ATrR%2Bb0M2z7dTfAf9Rdc8lAAnwdHcmvnEkyKkT%2FFymHI%3D
from 192.168.1.1 at 2020-02-02T18:01:18+00:00

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

$ sudo cat /var/www/html/nextcloud/config/config.php
<?php
$CONFIG = array (
  'instanceid' => 'ocqh8k0dgbes',
  'passwordsalt' => '[secret]',
  'secret' => '[secret]',
  'trusted_domains' => 
  array (
    0 => 'raspi',
    1 => '192.168.1.198',
    2 => 'my.url.org',
  ),
  'datadirectory' => '/var/nextcloud/data',
  'dbtype' => 'sqlite3',
  'version' => '17.0.3.1',
  'overwrite.cli.url' => 'http://raspi/nextcloud',
  'installed' => true,
  'maintenance' => false,
  'updater.secret' => '[secret]',
  'theme' => '',
  'loglevel' => 2,
  'mail_from_address' => '[secret]',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '[secret].com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.[secret].com',
  'mail_smtpport' => '465',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpname' => '[secret]',
  'mail_smtppassword' => '[secret]',
);

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

$ tail /var/log/apache2/access.log
192.168.1.1 - - [02/Feb/2020:19:06:43 +0000] "GET /nextcloud/index.php/apps/logreader/poll?lastReqId=Yxhn7Yjm7DybTiR47MUU HTTP/1.1" 200 757 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"
192.168.1.1 - stdcerr [02/Feb/2020:19:07:13 +0000] "PROPFIND /nextcloud/remote.php/dav/files/stdcerr/ HTTP/1.1" 207 4935 "-" "Mozilla/5.0 (Linux) mirall/2.6.2git (Nextcloud)"
192.168.1.1 - stdcerr [02/Feb/2020:19:07:10 +0000] "PROPFIND /nextcloud/remote.php/dav/files/stdcerr/ HTTP/1.1" 207 4920 "-" "Mozilla/5.0 (Windows) mirall/2.6.2stable-Win64 (build 20191224) (Nextcloud)"
192.168.1.1 - stdcerr [02/Feb/2020:19:07:16 +0000] "PROPFIND /nextcloud/remote.php/dav/files/stdcerr/ HTTP/1.1" 207 4919 "-" "Mozilla/5.0 (Linux) mirall/2.6.2git (Nextcloud)"
50.68.120.32 - stdcerr [02/Feb/2020:19:07:16 +0000] "PROPFIND /nextcloud/remote.php/dav/files/stdcerr/ HTTP/1.1" 207 4903 "-" "Mozilla/5.0 (Linux) mirall/2.6.2git (Nextcloud)"
50.68.120.32 - stdcerr [02/Feb/2020:19:07:18 +0000] "PROPFIND /nextcloud/remote.php/dav/files/stdcerr/ HTTP/1.1" 207 1166 "-" "Mozilla/5.0 (Linux) mirall/2.6.2git (Nextcloud)"
192.168.1.1 - stdcerr [02/Feb/2020:19:07:20 +0000] "PROPFIND /nextcloud/remote.php/dav/files/stdcerr/ HTTP/1.1" 207 4920 "-" "Mozilla/5.0 (Linux) mirall/2.6.2git (Nextcloud)"
192.168.1.1 - - [02/Feb/2020:19:07:21 +0000] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 1430 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"
192.168.1.1 - - [02/Feb/2020:19:07:05 +0000] "GET /nextcloud/index.php/apps/logreader/poll?lastReqId=Yxhn7Yjm7DybTiR47MUU HTTP/1.1" 200 757 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"
192.168.1.1 - stdcerr [02/Feb/2020:19:07:26 +0000] "PROPFIND /nextcloud/remote.php/dav/files/stdcerr/ HTTP/1.1" 207 4919 "-" "Mozilla/5.0 (Windows) mirall/2.6.2stable-Win64 (build 20191224) (Nextcloud)"