How to copy files using no owncloud web interface

Migrating was instant since we’re moving on the local fs. Checking the above screenshot you can see the rights are still the same of course. Own the folders to the ownCloud user and change the permissions to octal 755:

# Recursively own the folder to www-data

sudo chown -R www-data:www-data $OWNCLOUD_DATA_DIR/<user>/files/<folder>

# Set permissions so www-data has rwxr and group has read.

sudo chmod 755 $OWNCLOUD_DATA_DIR/<user>/files/<folder>

Moving a file/folder into ownCloud’s data directory doesn’t add it to the database automatically. Luckily, the ownCloud developers were kind enough to create a command line tool called occ that can manually add missing files and folders to the ownCloud database. You can run the following snippet on your server to check where this utility is located on the local file system:

find / -name "occ" 2>/dev/null

All you need to do is cd into that folder (in my case /var/www/owncloud) and run the following snippet:

For all account execute the following command:

sudo -u www-data php occ files:scan --all

For specific owncloud user id execute the following:

sudo -u www-data php occ files:scan <username>

Where www-data is the user your web server runs on. And now, it is time for the results:

YEAH!! So this command has definitely helped. Now you can add all your files directly into your ownCloud data folder without having to sync from the desktop client.

Src:

https://thibmaek.com/post/manually-migrating-existing-data-to-owncloud

https://bartsimons.me/manually-add-files-to-owncloud/

Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.