I need to change the default permissions for files created in Nextcloud since I want to access these files elsewhere.
I’m using External Storage to add a local drive to Nextcloud. SMB is not an option since this is much slower in my experience.
Any help is appreciated!
gas85
February 26, 2019, 12:03pm
2
Direct access is not the way how NC is working. You should use WebDav (what is more slower as SMB). Otherwise you can set some local folder as External Storage and give NC access to it --> https://docs.nextcloud.com/server/15/admin_manual/configuration_files/external_storage_configuration_gui.html#adding-files-to-external-storages
Do not forget that you have to re scan changes periodically (otherwise folder will be re scanned only by direct web access). Command to do this is: sudo -u www-data php occ files:scan --all
This command will rescan whole NC installation together with all internal and external files, so I wrote a script to do external storage rescan only:
#!/bin/bash
# By Georgiy Sitnikov.
#
# Will do external ONLY shares rescan for nextcloud and put execution information in NC log.
# If you would like to perform WHOLE nextcloud rescan, please add --all to command, e.g.:
# ./nextcloud-file-sync.sh --all
#
# AS-IS without any warranty
# Adjust to your NC installation
# Your NC OCC Command path
COMMAND=/var/www/nextcloud/occ
# Your NC log file path
LOGFILE=/var/www/nextcloud/data/nextcloud.log
# Your log file path for other output if needed
CRONLOGFILE=/var/log/next-cron.log
# If you want to perform cache cleanup, please change CACHE value to 1
CACHE=0
# Your PHP location
This file has been truncated. show original
Read more about this script under this tread: Automate OCC Filescan