Changes

From Amahi Wiki
Jump to: navigation, search
2,567 bytes added ,  16:06, 7 December 2014
no edit summary
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===
*Open a "terminal" window on the host server and "su" to the "root" ID (administrator).
*Install the WebDav client for the workstation distrubutiondistribution.<blockquote>{{Code|<pre>yum install davfs2}}</pre>
</blockquote>
*Add the ownCloud user(s) you want to be able to mount the share to "davfs2".
<blockquote>{{Code|<pre>usermod -aG davfs2 test}}</pre>
</blockquote>
*Edit /etc/fstab. Add the following line for each user that wants to mount the folder (with your details where appropriate).
<blockquote>Example fstab entry:
{{Text|Text=<pre>owncloud.server_name/files/webdav.php /home/test/owncloud davfs user,rw,noauto 0 0}}</pre>
</blockquote>
*Close the terminal window.
<blockquote>Example "secrets" file:
{{Text|Text=<pre>owncloud.server_name/files/webdav.php test testy001}}</pre>
</blockquote>
*Setup permissions on the "secrets" file so that a owner user ID can write to their file.
<blockquote>{{Code|<pre>chmod 600 ~/.davfs2/secrets}}</pre>
</blockquote>
*Now test the setup for a user ID.
<blockquote>{{Code|<pre>mount /home/<user ID>/owncloud}}</pre>
</blockquote>
*Enter the following text in to each user's "/home/<user ID>/home/.bashrc" file:
<blockquote>
{{Text|Text=<pre>mount /home/<user ID>/owncloud}}</pre>
</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.  ===Trusted Domains===As of ownCloud release version 6 a new security feature was added, "Trusted Domains". This feature is allows only trusted URLs and/or IP addresses to access ownCloud. During the initial installation process for a new ownCloud instance the first trusted domain is captured (URL/IP address) and added to the ownCloud "config.php" file. Any "untrusted" access will show an error message at the login session:<blockquote><pre>You are accessing the server from an untrusted domain.Please contact your administrator. If you are an administrator of this instance, configure the "trusted_domain" setting in config/config.php. An example configuration is provided in config/config.sample.php.</pre></blockquote> To resolve this the new domain can be added to the owncloud config.php, in the config directory. '''OR''' By commenting outthe trusted_domains setting. '''Example Scenario:''' In this example IP addresses will be used to demonstrate the trusted domains feature. The server in this example has an address of "192.168.0.101" on a wired network connection. It has been decided to add a Wifi connection to the server,which forms a "subnet" with address of "192.168.99.1". The Wifi subnet is a new domain, and is considered as an untrusteddomain by ownCloud. '''Configure Trusted Domains:''' * Locate the "config.php" file in the owncloud "config" directory. * Using an editor open the file as the "root" user, initially it will have the following entry:<blockquote><pre> 'trusted_domains' => array ( 0 => '192.168.0.101', ),</pre></blockquote> * Put a second entry in to the "trusted_domains array" for the Wifi address as follows:<blockquote><pre> 'trusted_domains' => array ( 0 => '192.168.0.101', 1 => '192.168.99.1', ),</pre></blockquote> ''' OR''' * Comment out the "trusted_domains array" as follows:<blockquote><pre>/* 'trusted_domains' => array ( 0 => '192.168.0.101', 1 => '192.168.99.1', ), */</pre></blockquote>'' Is this a security issue? That depends on the system owner or administrator...'' * Save the changes and exit the editor. * Any subsequent web browser access via the Wifi address to ownCloud will not be blocked. ===ownCloud Logfile Size===This tid bit was picked up from an ownCloud Blog item. The "owncloud.log" file, lives in the ownCloud "data directory", can reach a rather large file size. In the case of the blog a file size of 5.9 gigabytes big. Yeah, 6318901632 bytes.  * ownCloud can keep that file in check, but you have to enable that by adding the following to "config.php": 'log_rotate_size' => '100 MiB', * Using a text editor the config.php file will look like this afer the change:  $CONFIG = array ( 'instanceid' => '515c94d976c01', 'passwordsalt' => '6144794036e3aabc7d239238266b8e', 'datadirectory' => '/var/hda/files/owncloud7/data', 'dbtype' => 'mysql', 'version' => '7.0.3.4', 'dbname' => 'owncloud7', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'dbuser' => 'owncloud7', 'dbpassword' => 'owncloud7', 'installed' => true, 'theme' => '', 'maintenance' => false, 'log_rotate_size' => '100 MiB', ); * Reboot the server. * On a regular basis before backups are done make sure to delete any old log files no longer required.  
<br />
----
[[OwnCloud|Main ownCloud Page]]
----
<!--Category References follow-->
[[Category:ownCloud Collection]]