Getting ownCloud up and running

Hello and happy new year. Things have been slow lately due to christmas and other things, but I hope to get more time working on various projects in the future.

Installing ownCloud

Next up on the web server agenda is getting the ownCloud up and running. In my last attempt I managed to break the whole server, but luckily it was easy to revert back to a working version due to VirtualBox. I also found out I was installing it the hard way, by manual installation. The actual preferred installation is a semi automatic one listed here. I still have to do the security stuff that broke it the last time, but at least the installation itself is a bit quicker.

This will install ownCloud to the /var/www/ directory. The next step is to make a user and give ownCloud access to the database.

Setting up the admin user

And the ownCloud web site is once again up and running! Uploading files works smoothly. This is a good place to create a snapshot with VirtualBox. That way, if (read: when) I mess up again I can go back to where it works.

Securing ownCloud

This is where everything went wrong the last time. The goal is to secure the installation to prevent unauthorized access. As this server will be visible from the internet, which is needed for syncing outside my home, I need to be sure it is as secure as possible. The ownCloud installation manual got all the steps needed, now I just have to execute them without breaking anything.

I made the bash script as shown here, and called the script I changed permissions on the script, to make sure I could run it. This is where something went bad last time.

The last command shows who got the rights for this file. For me it listed the root user. Good enough I guess, since its my server I like to think of myself as root… The I ran the script.

Nothing happened of course. This, I think, is a good thing. Last time I remember getting a lot of weird warnings and errors due to permissions. So no news is good news. When I try to go into the ownCloud directory I get “permission denied”. This is also a good thing, as the script makes the “www-data”-user the only user allowed to access the files. Testing the web site from a browser seems ok, and I can delete and upload files without any errors.

Testing the system

After installing and securing the ownCloud service there is some testing needed. This is supposed to replace Dropbox, so I need to be sure everything works. I do not want to loose 500 pictures of my kid just because I messed up something. But the installation looks good, and it might be time to try it on the actual server, download the app and test it out in parallel with Dropbox for a while. There is probably some more settings I need to change for ownCloud, make a few scripts so I can easily update the install, this will be done at a later time. Right now I’m just happy it works.


One thought on “Getting ownCloud up and running”

Leave a Reply

Your email address will not be published. Required fields are marked *