User Tools

Site Tools


linux:owncloud:addfiles

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:owncloud:addfiles [2020/04/27 12:49] rpleckolinux:owncloud:addfiles [2021/04/27 11:16] (current) rplecko
Line 1: Line 1:
-=== Manually add files to ownCloud ===+=== Manually add files to OwnCloud / NextCloud ===
  
 [[http://bartsimons.me/manually-add-files-to-owncloud/|http://bartsimons.me/manually-add-files-to-owncloud/]] [[http://bartsimons.me/manually-add-files-to-owncloud/|http://bartsimons.me/manually-add-files-to-owncloud/]]
 +
 +First, find your data folder
 +<code>
 +
 +find / -name config.php 2>/dev/null | while read line ; do cat "$line" | grep " 'datadirectory'" ; done
 +
 +</code>
 +
 +Now //**cd**//  to the folder
 +
 +OwnCloud:
 +<code>
 +
 +cd /var/www/owncloud/data
 +
 +</code>
 +
 +NextCloud:
 +
 +<code>
 +cd /mnt/ncdata
 +
 +</code>
 +
 +Check the folder content
 +
 +<code>
 +ls -all
 +
 +</code>
 +
 +Find the users folder (cd again to it) find the files folder (cd again to it) and create a new folder within or move/copy files here
 +
 +<code>
 +mkdir testfolder
 +
 +</code>
 +
 +Moving a file/folder (or creating a new folder) into ownCloud's data directory doesn't add it to the database automatically. Now you should use a CLI tool called occ that can manually add missing files and folders to the ownCloud database. So, check where th e utility is located:
 +
 +<code>
 +find / -name "occ" 2>/dev/null
 +
 +</code>
 +
 +Change to folder in which occ was discovered:
 +
 +OwnCloud:
 +
 +<code>
 +cd /var/www/owncloud
 +
 +</code>
 +
 +NextCloud:
 +
 +<code>
 +cd /var/www/nextcloud
 +
 +</code>
 +
 +…and start occ to scan users folder
 +
 +<code>
 +sudo -u www-data php occ files:scan --all
 +
 +</code>
 +
 +this is how the output should look like
 +
 +<code>
 +root@owncloud:/var/www/owncloud# sudo -u www-data php occ files:scan --all
 +
 +Scanning files for 6 users
 +Starting scan for user 1 out of 6 (admin)
 +Starting scan for user 2 out of 6 (xxxxx1)
 +Starting scan for user 3 out of 6 (yyyyy2)
 +Starting scan for user 4 out of 6 (zzzzz3)
 +Starting scan for user 5 out of 6 (aaaaa4)
 +Starting scan for user 6 out of 6 (bbbbb5)
 +
 ++---------+--------+--------------+
 +| Folders | Files  | Elapsed time |
 ++---------+--------+--------------+
 +| 24076   | 150551 | 00:03:01     |
 ++---------+--------+--------------+
 +
 +</code>
 +
 +Now, the folder you have just created will appear in your web client...
 +
 +
 +
  
linux/owncloud/addfiles.1587991760.txt.gz · Last modified: 2020/04/27 12:49 by rplecko