Files:Scan - Help needed

9.1.x
hosting
help

#1

Please help us by providing the following info. Before posting please make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/ + https://owncloud.org/changelog/desktop/

Steps to reproduce
1. Paste files into OC folders on PC
2. FTP sync PC with OC Data directory (Files do not appear in user account when logged in via web browser)
3. Run Files:Scan on entire OC Data Directory.

Expected behaviour
After running Files:Scan the new files appear in the user account when they log in with their web browser.

Actual behaviour
I am unable to work out how to run file:scan

Client configuration
Client version:
Client operating system: Windows 7 pro

Server configuration
Operating system: Linux
Web server: Godaddy (I don't know what this is)
Database: mysql
PHP version: 5.4.45
ownCloud version (see ownCloud admin page): 9.1.4
Updated from an older ownCloud or fresh install: new install
Special configurations (external storage, external authentication, reverse proxy, server-side-encryption): none

ownCloud log (data/owncloud.log)

Please paste possible errors in the following code block, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808 for more info

I need help with creating a script (or whatever the correct term is) that will run File:Scan on the entire OC DATA directory.

THE REASON:
We use OC as a client portal in that we store client files on our network and use OC as a way for the clients to access them as well.
We paste files in to the user account folder on our PC and those folders are synced via FTP with the OC DATA directory on our web space. As the files haven't been 'uploaded' they are not visible to anyone accessing their user account via a web browser.
My hope is that running a file:scan periodically will index all the new files and make them visible.

The problem I have is that I have no idea how to do it. I've read the tutorials and other posts, but still can't work out what it means of how to run stuff.

Using the Desk Top client works, but is not practical as we have around 300 users and growing. We'd have to add each user account and I can't find out what the maximum number of user accounts that can be added.

Any help is much appreciated.


#2

Did you had a look at [1] or especially at [2] and [3] showing you how to run this command?

[1] https://doc.owncloud.org/server/latest/admin_manual/configuration_server/occ_command.html
[2] https://doc.owncloud.org/server/latest/admin_manual/configuration_server/occ_command.html#http-user-label
[3] https://doc.owncloud.org/server/latest/admin_manual/configuration_server/occ_command.html#file-operations


#3

Hi

Yes, I've read them and my problem is I don't understand where to put my 'script' or how to run it.

I think this is what I need;

sudo -u www-data php occ files:scan --help
Usage:
files:scan [-q|--quiet] [--unscanned] [--all]

Which should (I think) scan the the whole DATA Directory for unscanned files of ALL users.

  1. Where do I put it?
  2. How do I it run it?

My cPanel has a 'Cron Jobs' page where I can set up new cron jobs, but again I don't understand how to configure them. I'm sure it's pretty simple once I've done 1 I'lll be able to do more, but until the penny drops i'm lost.


#4

Hi,

yes this could be added to a cron job.

How this can be done highly depends on your environment and cPanel so it is not possible to give specific instructions for this in here. Try to get in touch with the support of your hoster or a community dedicated to cPanel how to achieve your goal.


#5

Hi. I've spoken to my hosting co and they've told me howto set up the cron job. Now I just need to know if my script is correct
I've written this;
sudo -u www-data php occ files:scan --help
Usage:
files:scan [-q|--quiet] [--all] [--unscanned]

i don't actually know what i've written, but hopefully it will scan all user account for un-scanned files. I've no idea what the 1st line means. I copied it from someone elses file.


#6

UPDATE:

I've just spoken to Goaddy and I can't run sudo on their shared hosting.

What do I do.


#7

Those are only examples for common debian distributions as explained in the linked documentation. Those commands needs to be adjusted to your environment.