Nextcloud version (eg, 12.0.2):17.0.1
Operating system and version (eg, Ubuntu 17.04):18.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.1): 7.3
The issue you are facing:
Is this the first time you’ve seen this error? (Y/N):Y
Steps to replicate it:
Fresh NC 17 installation
External HDD mounted with data directory in it
Rescanning of files
The output of your config.php file in /path/to/nextcloud :
Starting scan for user 1 out of 1 (user)
Home storage for user user not writable
Make sure you're running the scan command only as the user the web server runs as
Hi!
Owncloud is writing as the user of the webserver.
Is the www-data account able to write there?
You can check it with the following command:
sudo -u www-data mkdir /media/sda1/nextcloud/test
If it succeed you will have a folder called test on your harddrive and we verified that it is not a permission issue. If it fails you need to check the permissions on your drive.
Thanks for the quick response. ls -l gets me drwxrwx--- 1 www-data www-data 4096 Dec 9 15:50 files for the directory files. Permissons should be correct.
Permission problems are usually best be analyzed be switch to the web server user, navigation through the directory tree and trying to create a file in a directory, like
1. su - www-data -s /bin/sh
2. cd /media/sda1/nextcloud
3. touch ./xyz
4. if the file can is being create yo can delete it afterwards:
rm ./xyz
5. repeat the steps 3-5 with the users directory
cd /media/sda1/nextcloud/<user>
...
6. scan the directory with verbose output enabled:
./files:scan -vvv <user>