Changes

From Amahi Wiki
Jump to: navigation, search
4,690 bytes added ,  20:11, 19 November 2012
Created page with "Tips information provided here may sometimes lean towards a user with "Intermediate" and some "Advanced" computer skills. But don't let that scare you off! __TOC__ ===Removing..."
Tips information provided here may sometimes lean towards a user with "Intermediate" and some "Advanced" computer skills. But don't let that scare you off!
__TOC__
===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.

* 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.

===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).
:[[File: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.
:[[File: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.
<blockquote>{{Code|yum install davfs2}}
</blockquote>
*Add the ownCloud user(s) you want to be able to mount the share to "davfs2".
<blockquote>{{Code|usermod -aG davfs2 test}}
</blockquote>
*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

<blockquote>Example fstab entry:
{{Text|Text=owncloud.server_name/files/webdav.php /home/test/owncloud davfs user,rw,noauto 0 0}}
</blockquote>
*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.

<blockquote>Example "secrets" file:
{{Text|Text=owncloud.server_name/files/webdav.php test testy001}}
</blockquote>
*Setup permissions on the "secrets" file so that a owner user ID can write to their file.
<blockquote>{{Code|chmod 600 ~/.davfs2/secrets}}
</blockquote>
*Now test the setup for a user ID.
<blockquote>{{Code|mount /home/<user ID>/owncloud}}
</blockquote>
*Enter the following text in to each user's "/home/<user ID>/home/.bashrc" file:
<blockquote>
{{Text|Text=mount /home/<user ID>/owncloud}}
</blockquote>
*There should be an "owncloud" folder now on the workstation desktop after each successful logon.
:[[File: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.
<br />
----
[[OwnCloud|Main ownCloud Page]]
----
[[Category:Apps]]