Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
owncloud: can't write into config directory.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Simon196405
n00b
n00b


Joined: 22 Sep 2003
Posts: 39
Location: Utrecht, Holland

PostPosted: Sun May 12, 2013 8:18 am    Post subject: owncloud: can't write into config directory. Reply with quote

when going to localhost/owncloud I get:
Quote:

Can't write into config directory 'config'

You can usually fix this by giving the webserver user write access to the config directory in owncloud

ownCloud – web services under your control


Looking in the owncloud directy I get:
Code:
/var/www/localhost/htdocs/owncloud $ ls -l
total 140
drwxr-xr-x 26 root  root   4096 May 10 16:00 3rdparty
drwxr-xr-x 31 nginx nginx  4096 May 10 16:00 apps
-rw-r--r--  2 root  root    585 May 10 15:55 AUTHORS
drwxr-xr-x  2 nginx nginx  4096 May 12 09:31 config
-rw-r--r--  2 root  root  34520 May 10 15:55 COPYING-AGPL
-rw-r--r--  2 root  root    567 May 10 15:55 COPYING-README
drwxr-xr-x 10 root  root   4096 May 10 16:00 core
-rw-r--r--  2 root  root   3183 May 10 15:55 cron.php
drwxr-xr-x  2 nginx nginx  4096 May 10 16:00 data
-rw-r--r--  2 root  root  17438 May 10 15:55 db_structure.xml
drwxr-xr-x  2 root  root   4096 May 10 16:00 files
-rw-r--r--  2 root  root    102 May 10 15:55 index.html
-rw-r--r--  2 root  root    853 May 10 15:55 index.php
drwxr-xr-x 81 root  root   4096 May 10 16:00 l10n
drwxr-xr-x 18 root  root   4096 May 10 16:00 lib
drwxr-xr-x  2 root  root   4096 May 10 16:00 ocs
-rw-r--r--  2 root  root    443 May 10 15:55 public.php
-rw-r--r--  2 root  root    960 May 10 15:55 remote.php
-rw-r--r--  2 root  root     26 May 10 15:55 robots.txt
drwxr-xr-x  6 root  root   4096 May 10 16:00 search
drwxr-xr-x  8 root  root   4096 May 10 16:00 settings
-rw-r--r--  2 root  root   1216 May 10 15:55 status.php
drwxr-xr-x  2 root  root   4096 May 10 16:00 themes


To me this seems like that the webserver has access to it.
I did some googling but couldn't find anything else than someone who had that the webwerver looked at the wrong place.
This didn't help me enough.

Does anyone has any ideas what is going on.

Simon
Back to top
View user's profile Send private message
stikonas
n00b
n00b


Joined: 25 Mar 2012
Posts: 2

PostPosted: Tue Jun 11, 2013 12:32 pm    Post subject: Reply with quote

Run php-fpm service as nginx user.

There is a config option in /etc/php/fpm-php5.4/php-fpm.conf
Back to top
View user's profile Send private message
javeree
Apprentice
Apprentice


Joined: 29 Jan 2006
Posts: 292

PostPosted: Tue Jan 28, 2014 11:53 am    Post subject: Reply with quote

I have the exact same problem with owncloud 6.0.0a

The config directory seems accessible, the nginx server shows no complaints,
php-fpm runs as user nginx
....

Still I get
Quote:
Can't write into config directory!
This can usually be fixed by giving the webserver write access to the config directory.


Quote:
ps aux | grep php
root 3514 0.0 0.2 120980 4336 ? Ss jan27 0:04 php-fpm: master process (/etc/php/fpm-php5.5/php-fpm.conf)
nginx 3515 0.0 0.4 121472 9216 ? S jan27 0:00 php-fpm: pool www
....


Quote:
ps aux | grep nginx
nginx 3534 0.0 0.2 120980 4332 ? S jan27 0:00 php-fpm: pool www
root 3557 0.0 0.0 9748 1736 ? Ss jan27 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 21797 0.0 0.0 9748 1808 ? S 12:36 0:00 nginx: worker process


Quote:

ls -ld /mnt/www/cloud.vereecke.mooo.com/htdocs/owncloud/config
drwxr-xr-x 2 nginx nginx 4096 20 jan 14:27 /mnt/www/cloud.vereecke.mooo.com/htdocs/owncloud/config
Back to top
View user's profile Send private message
javeree
Apprentice
Apprentice


Joined: 29 Jan 2006
Posts: 292

PostPosted: Wed Jan 29, 2014 4:21 pm    Post subject: Reply with quote

Partially found the cause: owncloud does not seem to try and use the config file and data locations where it is installed using webapp-config,
but tries to access the 'master copy' at /usr/share/webapps/owncloud/6.0.0a/htdocs/

e.g. setting the owner of /usr/share/webapps/owncloud/6.0.0a/htdocs/config to nginx lead to a new error
Quote:

Data directory (/usr/share/webapps/owncloud/6.0.0a/htdocs/data) not writable by ownCloud
Permissions can usually be fixed by giving the webserver write access to the root directory.


Question is thus: is there another setting I need to make to tell the copy of owncloud under /mnt/www/cloud.vereecke.mooo.com/htdocs/owncloud/ to use another config/data location ?
Back to top
View user's profile Send private message
javeree
Apprentice
Apprentice


Joined: 29 Jan 2006
Posts: 292

PostPosted: Fri Feb 07, 2014 9:50 am    Post subject: Reply with quote

The problem in my case has been solved. I uninstalled and reinstalled owncloud. I am not sure if this was the key, but I set the use flag 'vhosts'.
On first connect, I still had a problem, but a config file was created in the right location, but with incorrect owner (root). I changed the owner of that file to owncloud, and as of that moment everything worked.
Back to top
View user's profile Send private message
armills
n00b
n00b


Joined: 31 Jan 2012
Posts: 3

PostPosted: Sun Apr 13, 2014 7:04 pm    Post subject: Reply with quote

I had a simliar issue, documenting here for posterity:

When loading I got an error message that the apps directory was not writable by ownCloud. Similar to the OP, it was trying to write to the /usr/share master copy. I reinstalled the package with the vhosts flag. I used webapp-config to wipe the previous installation, and used webapp-config to reinstall the instance in the default location. I was able to connect right away to the new installation, and the config.php has the correct owner.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum