External storage authority

Hello,
I’m setting up NextCloud on my raspberry pi with Ubuntu Mate on it. I’ve got pretty much everything setup except for external storage which consists of a couple of external hard drives. Whenever I run the “sudo -u www-data php occ files:scan --all --verbose” it does not find the external hard drive paths despite the fact that when I look at them in caja, they have an owner and group set to www-data. I was wondering how I can further go about diagnosing and figuring out how to fix this issue?

Many Thanks.

Hi,

not sure if this will work for you (it did for me).

go to the nextcloud folder (/var/www/html/nextcloud) and then run this command: sudo -u www-data php console.php files:scan --all

This worked for me.

Now, make sure that whenever you are mounting the external HDD its got the proper settings in the fstab

Regards!!

Hello. Thanks for your suggestion.

I did my cd /var/www/nextcloud

and then ran sudo -u www-data php console.php files:scan --all --verbose

and yet it still doesn’t go the external drives in the media folder where I set the authority to be owned by www-data.

Additionally if I specify the exact file path instead of ‘–all’ I get the message “Unknown User 1”

Have you created an external share to the external HDD which is share with users? NextCloud won’t scan any folders it isn’t aware of even if the owner is www-data.