So I am trying to set up owncloud and the tutorial I've been following tells me this:

Let's assume your apache runs as "www-data" (as it e.g. would under Ubuntu).

Then you should change all files to be owned by that user, like so:

chown -R www-data:www-data /media/usbdisk/ocdata

Now I have a problem with the setup since I can't acces my owncloud because of my permissions.

Is there a different user that runs apache on Raspberry?

  • Apache is run under www-data, as is nginx.
    – earthmeLon
    Commented Dec 2, 2013 at 21:12

2 Answers 2


You shouldn't do that (chown). Apache is running under a different user, for a purpose. You don't want a webserver that is accessible by the whole world to have access to all files. That is in case the program has some vulnerability that can be exploited.

You as a user must add permissions to files the server is allow to read, and most importantly which files it's allowed to write to.

To give read access you use chmod a+r file. Most of the time this isn't needed, since this is a default permission.

To give write access to a file or folder you use chmod a+w file.

  • I need this for the configuration of owncloud as I made a directory on my hdd and I want to give the apache owner the rights etc.
    – Loko
    Commented Nov 28, 2013 at 21:28

As rasbian and umbutu are both debian based, they have a lot in common, including typical apache configurations, so there are probably no problems following for one on another, other than the wisdom or lack thereof of the author.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.