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 13:18] 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 First, find your data folder
-  find / -name config.php 2>/dev/null | while read line ; do cat "$line" | grep " 'datadirectory'" ; done +<code> 
-   + 
-Now //**cd**// to the folder +find / -name config.php 2>/dev/null | while read line ; do cat "$line" | grep " 'datadirectory'" ; done 
-  cd /var/www/owncloud/data + 
-  +</code> 
 + 
 +Now //**cd**//  to the folder 
 + 
 +OwnCloud: 
 +<code> 
 + 
 +cd /var/www/owncloud/data 
 + 
 +</code> 
 + 
 +NextCloud: 
 + 
 +<code> 
 +cd /mnt/ncdata 
 + 
 +</code> 
 Check the folder content Check the folder content
-  ls -all + 
-  +<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 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
-  mkdir testfolder + 
-  +<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: 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:
-  find / -name "occ" 2>/dev/null + 
-  +<code> 
 +find / -name "occ" 2>/dev/null 
 + 
 +</code> 
 Change to folder in which occ was discovered: Change to folder in which occ was discovered:
-  cd /var/www/owncloud + 
-   +OwnCloud: 
-...and start occ to scan users folder + 
-  sudo -u www-data php occ files:scan --all +<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 this is how the output should look like
 +
 <code> <code>
 root@owncloud:/var/www/owncloud# sudo -u www-data php occ files:scan --all root@owncloud:/var/www/owncloud# sudo -u www-data php occ files:scan --all
Line 43: Line 90:
  
 </code> </code>
-   
- 
  
 +Now, the folder you have just created will appear in your web client...
  
  
  
  
linux/owncloud/addfiles.1587993513.txt.gz · Last modified: 2020/04/27 13:18 by rplecko