Can't create or write in smb data folder

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 : last
Operating system and version: Raspberry pi os bullseye 64bit
Apache or nginx version: Apache 2.4.52
PHP version: 8.0

The issue you are facing:
Cannot create or write to the data folder (during first configuration)

After replacing the external hdd connected in usb to a raspberry pi with a nas 
(to which the RPi is connected to the smb folder), during the reconfiguration, 
I continue to have permissions problems.  I have tried various combinations 
(700, 770 and even 777) to grant permissions to www-data, of the folder 
mounted in / home / user / NAS / NextCloud but I always get that it is not 
possible to write to the chosen folder.  Also from the nas I have granted all 
the permissions to the user with whom I use smb, but nothing changes.  
Has anyone had the same problem?

Is this the first time you’ve seen this error? : Y

Steps to replicate it:

  1. connect to serverip/nextcloud
  2. insert correct data for user and mariadb
  3. on the top show me that can’t create or write to data folder

The output of your Nextcloud log in Admin > Logging:

Can't access to nextcloud dashboard

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

<?php
$CONFIG = array (
  'instanceid' => '---------------',
); 

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

[Thu Feb 10 00:00:00.730903 2022] [mpm_prefork:notice] [pid 24042] AH00163: Apache/2.4.52 (Debian) configured -- resuming normal operations
[Thu Feb 10 00:00:00.731017 2022] [core:notice] [pid 24042] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 10 00:00:54.686529 2022] [mpm_prefork:notice] [pid 24042] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Feb 10 00:00:55.081111 2022] [mpm_prefork:notice] [pid 28684] AH00163: Apache/2.4.52 (Debian) configured -- resuming normal operations
[Thu Feb 10 00:00:55.081307 2022] [core:notice] [pid 28684] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 10 00:00:59.938667 2022] [php:error] [pid 28689] [client 192.168.178.23:51866] PHP Parse error:  syntax error, unexpected token "," in /var/www/nextcloud/config/config.php on line 4
[Thu Feb 10 00:01:00.099025 2022] [core:error] [pid 28690] (13)Permission denied: [client 192.168.178.23:51867] AH00035: access to /favicon.ico denied (filesystem path '/home/adblock/NAS') because search permissions are missing on a component of the path
[Thu Feb 10 00:01:30.986361 2022] [mpm_prefork:notice] [pid 28684] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Feb 10 00:01:31.322310 2022] [mpm_prefork:notice] [pid 29025] AH00163: Apache/2.4.52 (Debian) configured -- resuming normal operations
[Thu Feb 10 00:01:31.322513 2022] [core:notice] [pid 29025] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 10 00:28:46.744196 2022] [core:error] [pid 29028] (13)Permission denied: [client 192.168.178.23:52114] AH00035: access to /csrftoken denied (filesystem path '/home/adblock/NAS') because search permissions are missing on a component of the path
[Thu Feb 10 00:43:46.697111 2022] [core:error] [pid 29029] (13)Permission denied: [client 192.168.178.23:52280] AH00035: access to /csrftoken denied (filesystem path '/home/adblock/NAS') because search permissions are missing on a component of the path
[Thu Feb 10 00:49:19.273416 2022] [mpm_prefork:notice] [pid 29025] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Feb 10 00:49:54.124993 2022] [mpm_prefork:notice] [pid 1012] AH00163: Apache/2.4.52 (Debian) configured -- resuming normal operations
[Thu Feb 10 00:49:54.131574 2022] [core:notice] [pid 1012] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 10 08:22:18.025350 2022] [core:error] [pid 235393] (13)Permission denied: [client 192.168.178.23:31282] AH00035: access to /csrftoken denied (filesystem path '/home/adblock/NAS') because search permissions are missing on a component of the path