Difference between revisions of "OwnCloud Other Stuff"

From Amahi Wiki
Jump to: navigation, search
Line 3: Line 3:
 
===Removing an ownCloud Application===
 
===Removing an ownCloud Application===
  
Even though an ownCloud application is "Disabled" (not available to users) the program code remains in a directory. Sometimes it may be necessary to completely remove the application's program code from the ownCloud instance. In this example the "Who Share" application code will be removed.
+
Even though an ownCloud application is "Disabled" (not available to users) the program code remains in a directory. Sometimes it may be necessary to completely remove the application's program code from the ownCloud instance. Additionally there are some database entries that have to be removed also. In this example the "Who Share" application code will be removed.
  
 
* Open a "terminal" window on the host server and "su" to the "root" ID (administrator).
 
* Open a "terminal" window on the host server and "su" to the "root" ID (administrator).
Line 11: Line 11:
 
* Using the "ls" command again should show that the "files_whoshare" is gone.
 
* Using the "ls" command again should show that the "files_whoshare" is gone.
 
* Close the terminal window.
 
* Close the terminal window.
 +
* All entries in the ownCloud MySQL database have to be removed this can done by using phpMyAdmin.
 +
* In the database table "oc_appconfig", find all entries having the name of the "files_whoshare" application as "appid".
 +
* Remove those entries.
 +
* Now the "files_whoshare" application is completely removed from ownCloud.
  
 
===Mounting ownCloud as a File Share===
 
===Mounting ownCloud as a File Share===

Revision as of 15:46, 5 January 2013

Information provided here may sometimes lean towards a user with "Intermediate" and some "Advanced" computer skills. But don't let that scare you off!

Removing an ownCloud Application

Even though an ownCloud application is "Disabled" (not available to users) the program code remains in a directory. Sometimes it may be necessary to completely remove the application's program code from the ownCloud instance. Additionally there are some database entries that have to be removed also. In this example the "Who Share" application code will be removed.

  • Open a "terminal" window on the host server and "su" to the "root" ID (administrator).
  • "cd" in to the "/var/hda/web-apps/owncloud/html/apps" directory. This is where the ownCloud applications are stored.
  • Using the "ls" command a directory "files_whoshare" will be displayed. This is the directory that will be removed.
  • Using the "rm -fr files_whoshare" command the "Who Share" application code is removed.
  • Using the "ls" command again should show that the "files_whoshare" is gone.
  • Close the terminal window.
  • All entries in the ownCloud MySQL database have to be removed this can done by using phpMyAdmin.
  • In the database table "oc_appconfig", find all entries having the name of the "files_whoshare" application as "appid".
  • Remove those entries.
  • Now the "files_whoshare" application is completely removed from ownCloud.

Mounting ownCloud as a File Share

The ownCloud "Files" storage can be mounted to a local folder on a client workstation via WebDav. This can be done in one of two ways; manually via a file manager like Nautilus on some Linux distributions, or by auto-mounting when a user logs in to their workstation. The following access methods are explained with respect to a Fedora workstation.

Access via Nautilus

  • Run the Nautilus file manager.
  • From the Nautilus menu navigate to "File => Connect to Server...".
  • Enter the details for the Amahi ownCloud URL in to the "Server" field.
  • In the "Type" drop-down field, select "WebDAV (HTTP)".
  • In the "Folder" enter "/files/webdav.php".
  • Enter the ownCloud user ID, password, and check off "Remember this password" (only if you went to).
Oc nautilus webdav.png
  • Click on the "Connect" button. Nautilus will open to the ownCloud storage for the user and show a mounted folder on the desktop.
Oc nautilus connected.png
  • Now you can work with files stored on ownCloud like they are on the workstation.
  • Want to know something real cool? Bookmark the ownCloud connection in Nautilus! If you do this you can manually mount ownCloud when the need arises.

Auto-mount on Login

Workstation Setup:

  • Open a "terminal" window on the host server and "su" to the "root" ID (administrator).
  • Install the WebDav client for the workstation distrubution.
bash code
​yum install davfs2​
  • Add the ownCloud user(s) you want to be able to mount the share to "davfs2".
bash code
​usermod -aG davfs2 test​
  • Edit /etc/fstab. Add the following line for each user that wants to mount the folder (with your details where appropriate).
   For version 1.x: ADDRESS/webdav/owncloud.php /home/<username>/owncloud davfs user,rw,noauto 0 0
   For version 2.x: ADDRESS/files/webdav.php /home/<username>/owncloud davfs user,rw,noauto 0 0

Example fstab entry:

Text
​owncloud.server_name/files/webdav.php /home/test/owncloud davfs user,rw,noauto 0 0​
  • Close the terminal window.


Setup for Each ownCloud User ID:

  • Open a "terminal" window. You do not need to "su" to the root ID.
  • For each user create the directories "owncloud" and ".davfs2" (remember this is a hidden directory) in each user /home directory.
  • "cd" in to the ".davfs2" directory.
  • Create the file "secrets" file.
  • Depending on the version of the WebDav client enter one of the following text will be entered in to "secrets".
   For version 1.x: ADDRESS/webdav/owncloud.php <user ID> <user password>
   For version 2.x: ADDRESS/files/webdav.php <user ID> <user password>
Note: <user ID> and <user password> are to be replaced with each user's ID and password.

Example "secrets" file:

Text
​owncloud.server_name/files/webdav.php test testy001​
  • Setup permissions on the "secrets" file so that a owner user ID can write to their file.
bash code
​chmod 600 ~/.davfs2/secrets​
  • Now test the setup for a user ID.
bash code
​mount /home/<user ID>/owncloud​
  • Enter the following text in to each user's "/home/<user ID>/home/.bashrc" file:
Text
​mount /home/<user ID>/owncloud​
  • There should be an "owncloud" folder now on the workstation desktop after each successful logon.
Oc automount webdav.png
  • ownCloud will auto-mount from this point and you can work with files stored on ownCloud like they are on the workstation.



Main ownCloud Page