Cloud storage services like Dropbox have changed the way people collaborate and share files, but to get the most out of them, you need to trust your data to a third-party provider. This might not be an issue for the average desktop user, but for an enterprise it may be a deal-breaker. If you don't want to lose control of your data, yet enjoy all the benefits of an always-available and synchronized online repository, you can turn to ownCloud, an application that lets users share and sync files within the confines of your enterprise firewall on servers you control.
ownCloud provides multiple editions, all licensed under the AGPL. The Enterprise Edition has a dual license that allows customers to implement third-party proprietary plugins and extensions, and features mobile and desktop clients. While the freely available Community Edition has all the essential features, enterprise customers get additional ones such as the ability to use the Oracle database instead of MySQL, and a logging plugin that keeps detailed records of user actions on files. Users of the commercial editions of ownCloud can also define and direct users to different storage locations based on their roles and needs.
ownCloud can integrate with your existing network infrastructure. You can, for example, tie it in with your single sign-on infrastructure and directory server, which lets you avoiding setting up new user accounts. ownCloud has extensive user account management features that let you control whether your data is accessible to all users, a particular group of users, or just a specific user. Its granular permissions let users determine who can do what with their shared data.
The software has an impressive online file manager that can handle files in a variety of formats. It lets you view and edit files in both text and Open Document Format (such as ODT, ODP, and ODS) from within a browser. In addition, it can handle images and music files in the most popular file formats, and has a built-in gallery image viewer and a music player. It also gives you the option to encrypt your files. And ownCloud lets you mount external cloud storage drives, such as Google Drive, Amazon S3, Dropbox, and OpenStack Swift, and seamlessly manage data on these services along with that in your private cloud.
Another interesting feature is file versioning, which comes in handy especially when you are sharing files with multiple users. With this feature, the ownCloud server tracks all changes to every file and lets you revert to an older version with a single click.
Along with files, ownCloud also lets you keep your calendar and address book in sync with ones on your desktop and mobile platforms. You can also share them with other ownCloud users.
In essence, ownCloud is a PHP application that runs atop the Apache web server. To manage data, it can either use SQLite (the default) or MySQL. The app also uses open protocols; for example, you can access files using the WebDAV protocol, sync calendars with CalDAV, and sync address books with CardDAV. Its web interface is built using HTML5.
Like other online cloud storage services, you can sync files on ownCloud either using the web browser or a desktop client on Windows, Mac, and Linux. Clients for Android and iOS devices let you access files on the ownCloud server from your mobile phone.
Installing ownCloud doesn't take much effort. Its developers provide binaries for most popular operating systems, including CentOS.
If you are installing ownCloud on a fresh CentOS installation, make sure the server has a static IP address. For this tutorial we will use a server called owncloud.example.com with the IP address 192.168.2.111.
Start by installing the EPEL repositories:
# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Next, install the ownCloud repositories:
# cd /etc/yum.repos.d/ # wget http://download.opensuse.org/repositories/isv:ownCloud:community/CentOS_CentOS-6/isv:ownCloud:community.repo
You can then install the ownCloud server and its dependencies with
yum install owncloud.
Next, create a configuration file for ownCloud and set up a virtual host to handle requests:
# vi /etc/httpd/conf/owncloud.conf Alias /owncloud /var/www/owncloud/ <Directory /var/www/owncloud/> Options None Order allow,deny Allow from all </Directory> <VirtualHost *:80> DocumentRoot /var/www/html/owncloud ServerName owncloud.example.com ErrorLog logs/owncloud.error_log CustomLog logs/owncloud.access_log common </VirtualHost>
Now edit Apache's configuration file (/etc/httpd/conf/httpd.conf) and point to the ownCloud configuration file by adding the following line to the end:
Before you bring up the ownCloud server, you must also edit PHP's configuration file (/etc/php.ini), because by default PHP allow users to upload only files that are less than 2MB in size. Open the file and look for the
upload_max_filesize variable and change it from 2M to something like 500M or 1G. Also increase the size of the
post_max_size variable slightly.
Finally, you need to open ports in your firewall to allow other computers on the network to access ownCloud:
# iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT # service iptables save # service iptables restart
Now start (or restart) the Apache web server with
service httpd restart to bring the ownCloud server online. You can then fire up a web browser and navigate to the ownCloud instance at owncloud.example.com. Since this is a new installation, you'll be asked to create a user account for the ownCloud administrator.
By default, ownCloud keeps its data under /var/www/html/owncloud/data and uses the SQLite database. If you want to use MySQL, or want to change the data folder, click on the Advanced pull-down menu. If you choose MySQL you must specify the username and password of the MySQL admin and provide a name for the database that will house ownCloud's data.
You're now logged into your ownCloud server as the administrator. In the main interface, click on the gears icon in the bottom left corner to bring up the Settings menu, then click on the Admin option, which houses several configurable parameters. Here you can alter the maximum upload size for a single file and disable version control for files.
Before you can start using the ownCloud server, you need to add users and organize them into groups. You can either do this manually, or if you have a directory server already set up, you can connect to it by activating the LDAP back end.
Once you have added users, they can upload data to the ownCloud installation by pointing their web browsers to the ownCloud server and logging in with their credentials.
The ownCloud interface is pretty usable and easy to follow. When you log in you are at the Files tab. To upload a file, click on the green arrow, or just drag and drop files from your desktop. If you've uploaded a file in a format that ownCloud understands, you can click on its name to view and edit the file.
Optionally, since ownCloud uses the WebDAV protocol, you can also access it from your file manager. For example, in Nautilus you can enter in the location area a URL such as
dav://192.168.2.111/files/webdav.php. Once you've authenticated, the ownCloud storage will be mounted and available just like a regular folder.
Share and collaborate
Applications for ownCloudonline app store. Some of the most useful apps include:
Besides the in-built features, you can also extend your ownCloud server by enabling add-on apps. The freely available Community Edition of ownCloud ships with several apps, and you can download more from an
To share uploaded files, go to the Files tab in the web interface and hover over the file or folder you wish to share. This displays several options, including Share, which lets you select which users or groups you want to share the item with and whether you want to give them permission to modify the files.
You can also share an item with someone who isn't on your ownCloud server. When you click on the "Share with link" checkbox, ownCloud displays a link to the item that you can share with anybody who can reach your ownCloud server. Optionally you can also password-protect the link and set an expiration date.
To sync contacts, your first need to import them. ownCloud supports the popular vCard file format (with the .vcf file extension). Almost every popular email app, including online ones such as Gmail, can export their address books in this format.
With a .vcf file in hand, head to the Contacts tab in the ownCloud interface and click on the Import icon. Once you've imported your contacts you can sync the address book with that of other clients that can read CardDAV links. In the Contacts tab, click on the gears icon at the bottom, then on the More link to display all the address books. Hover over the name of the address book you just imported and click on the first icon to spit out a CardDAV link for this address book that you can feed to your desktop or mobile address book client.
Similarly, ownCloud can manage your calendar and tasks. To create an event in your calendar, head to the Calendar tab. To add an event, click anywhere on the calendar. This brings up a window that gives you several options to configure the event.
After you save an event you can use ownCloud to share it with other users. Click on the calendar icon in the top right corner. Hover over the calendar you wish to share and click on the Share Calendar icon. This brings up a pull-down menu that lets you select the users or groups you wish to share the calendar with.
ownCloud can sync your calendars with desktop and mobile apps that can read this information from CalDAV links. To get the CalDAV link for your calendar, click on the Calendars button, then click on the second icon to display a link that you can pass on to clients to keep them in sync with the ownCloud calendar.
To synchronize folders from any desktop to your ownCloud server, you have to install a client. To install a sync client on a CentOS 6.3 desktop, run the following commands:
# cd /etc/yum.repos.d/ # wget http://download.opensuse.org/repositories/isv:ownCloud:devel/CentOS_CentOS-6/isv:ownCloud:devel.repo # yum install owncloud-client
Once the client is installed, configure it by pointing to the server. It will connect and by default create a local sync folder such as /home/bodhi/ownCloud, as well as a remote folder named "clientsync" on the server.
Users can specify one or more directories on a local machine to sync with the ownCloud server. If a directory is shared with several users, then when anyone makes a change to a file on one computer, it automatically flows across to the others.
When collaborating with others, ownCloud's simple version control system creates backups of files which are accessible via the History pull-down option, which also links to an “All versions...” page where you can roll back a file to a previous version.
If your users collaborate on projects by sharing files, you can enhance their workflow and improve your security by deploying ownCloud. It gives users anytime, anywhere access to their data, and lets enterprise keep control of its own data.