Hello,
I have in use a nc 18.04 (intel i5) and the files of a external discstation from synology connected with samba.
If I call "sudo -u www-data php occ files:scan " the error message
mkdir failed on directory /var/run/samba/msg.lock: Permission denied
occured.
The /var/run/samba/ folder is root:root:
drwxr-xr-x 3 root root 60 Apr 30 06:08 .
drwxr-xr-x 34 root root 1160 Mai 10 14:42 ..
drwxr-xr-x 2 root root 60 Apr 30 06:08 upgrades
michael@nextcloud:/var/run/samba$
Must this www-data:www-data to work fine?
Regards
Michael
Do you have samba mounted by the OS or by Nextcloud?
For any file access not carried out inside Nextcloud itself, it will be done in the context of the user www-data. Make sure the www-data user can access the mounted share.
I have mounted my discstation folder my this:
sudo mount 192.168.178.188:/volume3/FC_Daten/daten /media/fc_daten
and this folder have www-data rights:
drwxrwx--- 1 www-data www-data 4282 Mai 10 19:05 fc_daten
But the error message is:
mkdir failed on directory /var/run/samba/msg.lock: Permission denied
and this folder have root:root
drwxr-xr-x 3 root root 60 Apr 30 06:08 .
drwxr-xr-x 34 root root 1160 Mai 10 14:42 ..
drwxr-xr-x 2 root root 60 Apr 30 06:08 upgrades
michael@nextcloud:/var/run/samba$
So my question is: Should I change the owner to www-data:www-data for this folder also?
I’m a little unclear on exactly what you’re trying to do. What is Nextcloud’s relation to /media/fc_daten ?
/media/fc_daten is the document root from my nextcloud
mkdir and /var/run/samba/msg.lock makes no sense on “occ files:scan”.
Sorry. No further Idea.
Please cut-and-paste command and error in one code-block. Thanks.
I have the same issue on my setup. Here is the output from my occ files:scan --all:
mkdir failed on directory /var/run/samba/msg.lock: Permission denied
Protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
My nextcloud 18.0.4 runs in a proxmox lxc with the data dir mounted to /mnt/data. the fstab is as follows
//192.168.178.47/nextcloud/data /mnt/data cifs rw,vers=3.0,credentials=/root/.smbcred,uid=www-data,gid=www-data,file_mode=0770,dir_mode=0770 0 0
I have the same issue:
This is the commands I used:
sudo -u www-data php /var/www/nextcloud/occ files:scan --all
sudo -u www-data php /var/www/nextcloud/occ files:scan-app-data
And this is the output:
Starting scan for user 1 out of 1 (castillo92)
mkdir failed on directory /var/run/samba/msg.lock: Permission denied
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 1628 | 17924 | 00:00:09 |
+---------+-------+--------------+
Scanning AppData for files
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 6774 | 2606 | 00:00:21 |
+---------+-------+--------------+