Difference between revisions of "This can usually be fixed by giving the webserver write access to the root directory"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(Created page with "<hide> page type::article thing type::error message full text::Cannot create "data" directory ({{arg|path}})<br>This can usually be fixed by giving the webserver wri...")
 
(No difference)

Latest revision as of 21:38, 5 August 2015

About

This is an error message generated by ownCloud. Ostensibly, it means that ownCloud's data folder is set to prevent the web server from writing to it, but in practice it sometimes occurs even when the correct ownership and access permissions are set (should be chmod 770 and chown www-data:www-data, assuming Apache's user is "www-data").

The problem also seems to generate an unrelated error in <data directory path>/owncloud.log: Error while making request: SSL certificate (error code: 60)

Possible Solution

Tentatively, the cause is that ownCloud (i.e. Apache) cannot write to the data folder's immediate parent. For example, if ownCloud's data folder is /mnt/storage/data/owncloud, then it needs to be able to write to /mnt/storage/data, even if the "owncloud" folder already exists.

To fix this, make the parent folder writeable, or point ownCloud's data folder at a subdirectory of the one you were originally going to use (in the above example, "/mnt/storage/data/owncloud/data" should work even if it is a bit awkward).

In actual usage, I renamed "/mnt/storage/data" to "/mnt/storage/www-data" and chowned it to www-data:www-data – in effect making it a folder for Apache-writable data in general, with "owncloud" as a subfolder of that.

Diagnosis

Things to try:

  • In <script path>/config/config.php, change the value of 'datadirectory' to "/tmp/owncloud". OwnCloud should be able to create this directory on its own, and the error should go away.

Outlinks

Other examples of this error: