Any way to exclude folder(s) from occ files:scan?


#1

Hi, I am using an external drive mount and it's on a Mac so the file system is HFS+.
The drive has a few hidden folders, like ".Trashes" and ".501", which are created (I believe) at format time and root-owned.
"occ files:scan" will always abort at these folders since it cannot read them, with this message:

Exception during scan: opendir(/path/to/externalmount/.Trashes): failed to open dir: Permission denied

Is there any way to instruct "occ files:scan" to skip all hidden (dot-named) folders, which are useless for file storage purposes anyway?

Thanks for any suggestion.


#2

config.sample.php:


#3

Thank you thousands!


#4

Thank you but it doesn't seem to work. My config.sample.php does not contain the paragraph you pasted. Using OC 9.1.6.2 on Ubuntu 17.04, working fine except for this files:scan problem. I inserted the 'excluded_directories' array as written below in my config.php, but files:scan keeps aborting at /.Trashes dir.


'excluded_directories' =>
array (
'.fseventsd',
'.Spotlight',
'.TemporaryItems',
'.Trashes'
)
<... etc>

Grateful for any ideas. Thanks again


#5

What do you mean abort? What does the output show? What is in the owncloud.log? Can you try with -vvv so that you get a full stacktrace on failure. Perhaps we can report this to github with a proper bug report if this is a bug in functionality.


#6

It this isn't included in your config.sample.php then i would guess this functionality isn't available in 9.1.6 but only in newer versions like 10