Difference between revisions of "Media Sharing Using ownCloud"

From Amahi Wiki
Jump to: navigation, search
Line 65: Line 65:
  
 
The default media directories provided by Amahi Home Server can be used to store media files and managed (i.e. uploads, deletions) by ownCloud. Although there is one caution, '''all management''' of the media files should be done via ownCloud. If Samba use continues for the media files there is a high risk the files will no longer be visible to users in ownCloud and other Amahi applications. Only a lot of manual changes to file ownership and permissions after any changes can provide visibility to ownCloud and other Amahi applications.
 
The default media directories provided by Amahi Home Server can be used to store media files and managed (i.e. uploads, deletions) by ownCloud. Although there is one caution, '''all management''' of the media files should be done via ownCloud. If Samba use continues for the media files there is a high risk the files will no longer be visible to users in ownCloud and other Amahi applications. Only a lot of manual changes to file ownership and permissions after any changes can provide visibility to ownCloud and other Amahi applications.
 +
 +
* Using the server console or remote connection login using the "root" user.
 +
 +
* Before going past this step the amount of work to be done in the next steps needs to be considered as it CAN be VERY tedious. Do the current Amahi directories already contain files? If so the next steps involve a lot methodical pounding of the keyboard. Or the other alternative would be to move the files elsewhere, do the configuration work, and then upload the files via ownCloud services in to the reconfigured Amahi directories.
 +
 +
* Using the  "cd" command go to "/var/hda/files/".
 +
 +
* Change the ownership on the movies, music, and pictures directories.
 +
 +
<blockquote>
 +
{{Code|chown -vR apache:apache movies
 +
chown -vR apache:apache music
 +
chown -vR apache:apache pictures}}</blockquote>
 +
* The previous two steps now give the ownCloud application access to the Amahi media directories.
 +
 +
*  Using the "cd" command go in to each of the media directories and change the permissions for any files that might be already stored. Files ownerships were already previously set in a prior step. These settings ensure that all the files already stored are set to the same ownership and permissions as future files stored by ownCloud. These settings also ensure the existing files are visible to ownCloud.
 +
 +
<blockquote>
 +
{{Code|cd /var/hda/files/movies
 +
chmod -vR 664 *
 +
cd /var/hda/files/music
 +
chmod -vR 664 *
 +
cd /var/hda/files/pictures
 +
chmod -vR 664 *}}</blockquote>
 +
 +
* Change the permissions on the movies, music, pictures directories. Also any subdirectories below these directories must also be changed to the same permissions.
 +
 +
<blockquote>
 +
{{Code|chmod -vR 775 movies
 +
chmod -vR 775 music
 +
chmod -vR 775 pictures}}</blockquote>
 +
 +
* These the Amahi directories have been reconfigured for ownCloud use. The following steps will now involve configuring ownCloud for the sharing of the Amahi directories.
 +
 +
* Navigate to Settings => Apps. Make sure the ownCloud applications previously mentioned are enabled.
 +
 +
* Login to ownCloud admin user. Navigate to Settings => Users.
 +
 +
*
 +
 +
 +
  
 
<more to follow>
 
<more to follow>

Revision as of 19:21, 13 December 2012

Msgbox-WOPr.png Work In Progress
This article is currently undergoing major expansion or restructuring. You are welcome to assist by editing it as well. If this article has not been edited in several days, please remove this template.


Media files (Music, Photos, Videos) can be stored and accessed on the Amahi Home Server with one of two scenarios while using ownCloud.

  1. Using existing “Amahi Shares” for file storage and ownCloud for file access and storage management.
  2. Using ownCloud for file storage, managing access, and file storage management.


Oc tip.png ownCloud Tip!
Before continuing on please make sure the following ownCloud subject areas are understood. "User and Group Administration" and "ownCloud Sharing"


Both scenarios should allow other applications on Amahi to access the media files (i.e. Amahi DLNA). Regardless of which scenario is chosen some knowledge of Linux utilities will be required to do the configuration changes. The amount of configuration work needed is about the same for each scenario.

Before Making Changes

Please read the following sections before making decisions and changes.

Amahi Home Server File Shares

Amahi Home Server provides a set of “Storage Shares” that are available to all Amahi user accounts. Some of them are provided for the purposes of storing media files (Music, Pictures, Movies) for all Amahi users to access. These shares are usually shared via the Samba (SMB) sharing service on the Amahi Home Server.

Some things you need to know:

  • Music media physical location: /var/hda/files/music (a.k.a. Music)
  • Photograph media physical location: /var/hda/files/pictures (a.k.a. Pictures)
  • Video media physical location: /var/hda/files/movies (a.k.a. Movies)
  • Share(s) directory ownership default (chown): <hda_administrator_account>:users
  • Share(s) directory permissions default (chmod): 775 (rwx:rwx:r-x)
  • Storing media files in the shares is usually done by mounting each share locally on a client workstation via the SMB service on Amahi.

ownCloud External Storage Support

ownCloud provides a highly configurable sharing environment for files that are accessible from a Web Browser User Interface (Web UI), the WebDAV service built in to ownCloud, or an ownCloud Sync client installed on a workstation.

Some things you need to know:

  • ownCloud provides an “External Storage Support” feature that supports access to files “external” to the ownCloud “internal” filesystem.
  • File ownership after upload (using ownCloud provided services): apache:apache
  • File permissions after upload (using ownCloud provided services): 664 (rw-:rw-:r--)
  • Required directory ownership for ownCloud: apache:users
  • Required directory permissions for ownCloud: 770 (rwx:rwx:---)

ownCloud Applications

Two ownCloud applications will be discussed; "External Storage" support, "ReScan Filesystem Icon".

  • The "External Storage support "backend" application is required for connecting filesystems external to ownCloud. Login as the ownCloud admin user and navigate to Settings => Apps.


Oc tip.png ownCloud Tip!
Please make sure the following ownCloud subject area is understood: ownCloud Applications


  • Move down the list of applications available to the External Storage support application, click once on it, then click on the "Enable" button.
Oc install app ext storage support.png
  • Navigate to Settings => Admin there should be a section called "External Storage". There are a number of connection methods available in this setting. Only the "Local" method will be discussed further on.
Oc app ext storage support.png
  • The ReScan Filesystem Icon is optional but it is a very good idea to install it.
  • Move down the list of applications available to the ReScan Filesystem Icon application, click once on it, then click on the "Enable" button.
Oc install app recan fs.png
  • Navigate to "Files" and the ReScan Filesystem Icon will appear next to the Files menu item.
Oc app rescan fs.png
  • Clicking on the icon manually initiates an ownCloud "file scan" of the current ownCloud directory appearing in the Web UI.

Amahi Media Shares with ownCloud

The default media directories provided by Amahi Home Server can be used to store media files and managed (i.e. uploads, deletions) by ownCloud. Although there is one caution, all management of the media files should be done via ownCloud. If Samba use continues for the media files there is a high risk the files will no longer be visible to users in ownCloud and other Amahi applications. Only a lot of manual changes to file ownership and permissions after any changes can provide visibility to ownCloud and other Amahi applications.

  • Using the server console or remote connection login using the "root" user.
  • Before going past this step the amount of work to be done in the next steps needs to be considered as it CAN be VERY tedious. Do the current Amahi directories already contain files? If so the next steps involve a lot methodical pounding of the keyboard. Or the other alternative would be to move the files elsewhere, do the configuration work, and then upload the files via ownCloud services in to the reconfigured Amahi directories.
  • Using the "cd" command go to "/var/hda/files/".
  • Change the ownership on the movies, music, and pictures directories.
bash code
​chown -vR apache:apache movies chown -vR apache:apache music chown -vR apache:apache pictures​
  • The previous two steps now give the ownCloud application access to the Amahi media directories.
  • Using the "cd" command go in to each of the media directories and change the permissions for any files that might be already stored. Files ownerships were already previously set in a prior step. These settings ensure that all the files already stored are set to the same ownership and permissions as future files stored by ownCloud. These settings also ensure the existing files are visible to ownCloud.
bash code
​cd /var/hda/files/movies chmod -vR 664 * cd /var/hda/files/music chmod -vR 664 * cd /var/hda/files/pictures chmod -vR 664 *​
  • Change the permissions on the movies, music, pictures directories. Also any subdirectories below these directories must also be changed to the same permissions.
bash code
​chmod -vR 775 movies chmod -vR 775 music chmod -vR 775 pictures​
  • These the Amahi directories have been reconfigured for ownCloud use. The following steps will now involve configuring ownCloud for the sharing of the Amahi directories.
  • Navigate to Settings => Apps. Make sure the ownCloud applications previously mentioned are enabled.
  • Login to ownCloud admin user. Navigate to Settings => Users.



<more to follow>

Media Sharing with ownCloud

Storing all media files within the ownCloud file system still allows access by other Amahi applications (i.e. Amahi DLNA) to these files. Only one caution, other applications will have to be configured to access the ownCloud filesystem directories.

<more to follow>


Main ownCloud Page | Index