You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by afshin afzali <a....@gmail.com> on 2010/06/17 13:19:19 UTC

local.ini Permission Problem

Hi Guys,

After successful installation of couchdb 0.11 on ubuntu server 10.4 LTS,
I've encountered to two issues :
1) The reader_acl fails
2) Can not create couchdb admin user

and as I could realize, the issue come from permissions of local.ini file!
as you can see the default permission is 644 and means the others (including
couchdb user) could just read it.


root@srv1:/etc/couchdb# ls -l
total 20
drwxr-xr-x 2 root root 4096 2010-06-17 08:17 default.d
-rw-r--r-- 1 root root 4579 2010-06-17 08:17 default.ini
drwxr-xr-x 2 root root 4096 2010-06-17 08:17 local.d
-rw-r--r-- 1 root root 1332 2010-06-17 10:45 local.ini


When I try to define couchdb's admin user, couchdb writes to local.ini and
gets this.

[Thu, 17 Jun 2010 09:04:46 GMT] [error] [<0.8936.0>] ** Generic server
couch_config terminating
** Last message in was {set,"admins","admin","admin",true}
** When Server state == {config,[{<0.8955.0>,#Fun<couch_config.2.17946139>},
                                 {<0.8954.0>,#Fun<couch_config.2.17946139>},
                                 {<0.8952.0>,#Fun<couch_config.2.17946139>},
                                 {<0.8950.0>,#Fun<couch_config.2.17946139>},
                                 {<0.8948.0>,#Fun<couch_config.2.17946139>},
                                 {<0.8947.0>,#Fun<couch_config.2.17946139>},
                                 {<0.8947.0>,#Fun<couch_config.2.17946139>},
                                 {<0.8945.0>,#Fun<couch_config.3.70971031>},
                                 {false,#Fun<couch_server.3.35387302>},
                                 {<0.8942.0>,#Fun<couch_config.3.70971031>},
                                 {<0.8942.0>,#Fun<couch_config.2.17946139>},
                                 {<0.5.0>,#Fun<couch_config.2.17946139>}],
                                "/etc/couchdb/local.ini"}
** Reason for termination ==
** {{badmatch,{error,eacces}},
    [{couch_config_writer,save_to_file,2},
     {couch_config,handle_call,3},
     {gen_server,handle_msg,5},
     {proc_lib,init_p_do_apply,3}]}


After changing the permissions to 646 (I know this causes security issue)
the problem solved!


appreciate all comments,
-- afshin

Re: local.ini Permission Problem

Posted by afshin afzali <a....@gmail.com>.
You right, I've found the chown and chmod commands in INSTALL.Unix file
before, but as I followed the wiki page forgot to compare them to previous
one.

Thank you very much for your help
-- afshin

On Thu, Jun 17, 2010 at 3:32 PM, Noah Slater <ns...@tumbolia.org> wrote:

> It's in the source tarball.
>
> If you're on Ubuntu, you can find it installed into:
>
>        /usr/share/doc/couchdb
>
> Take a read through all of the files there, they are all useful.
>
> On 17 Jun 2010, at 12:57, afshin afzali wrote:
>
> > Hi,
> >
> > I just followed this :
> http://wiki.apache.org/couchdb/Installing_on_Ubuntu
> > in Wiki, where is this README :D
> >
> > Regards,
> > -- afshin
> >
> > On Thu, Jun 17, 2010 at 3:22 PM, Noah Slater <ns...@tumbolia.org>
> wrote:
> >
> >>
> >> On 17 Jun 2010, at 12:19, afshin afzali wrote:
> >>
> >>> After changing the permissions to 646 (I know this causes security
> issue)
> >>> the problem solved!
> >>
> >> Have you followed the instructions in the correct README file?
> >>
> >> They include commands to sort out permissions in a secure manner.
> >>
> >> Specifically, chown them to the couchdb user and put the perms back to
> 644,
> >> or less.
> >>
> >>
>
>

Re: local.ini Permission Problem

Posted by Noah Slater <ns...@tumbolia.org>.
It's in the source tarball.

If you're on Ubuntu, you can find it installed into:

	/usr/share/doc/couchdb

Take a read through all of the files there, they are all useful.

On 17 Jun 2010, at 12:57, afshin afzali wrote:

> Hi,
> 
> I just followed this : http://wiki.apache.org/couchdb/Installing_on_Ubuntu
> in Wiki, where is this README :D
> 
> Regards,
> -- afshin
> 
> On Thu, Jun 17, 2010 at 3:22 PM, Noah Slater <ns...@tumbolia.org> wrote:
> 
>> 
>> On 17 Jun 2010, at 12:19, afshin afzali wrote:
>> 
>>> After changing the permissions to 646 (I know this causes security issue)
>>> the problem solved!
>> 
>> Have you followed the instructions in the correct README file?
>> 
>> They include commands to sort out permissions in a secure manner.
>> 
>> Specifically, chown them to the couchdb user and put the perms back to 644,
>> or less.
>> 
>> 


Re: local.ini Permission Problem

Posted by afshin afzali <a....@gmail.com>.
Hi,

I just followed this : http://wiki.apache.org/couchdb/Installing_on_Ubuntu
in Wiki, where is this README :D

Regards,
-- afshin

On Thu, Jun 17, 2010 at 3:22 PM, Noah Slater <ns...@tumbolia.org> wrote:

>
> On 17 Jun 2010, at 12:19, afshin afzali wrote:
>
> > After changing the permissions to 646 (I know this causes security issue)
> > the problem solved!
>
> Have you followed the instructions in the correct README file?
>
> They include commands to sort out permissions in a secure manner.
>
> Specifically, chown them to the couchdb user and put the perms back to 644,
> or less.
>
>

Re: local.ini Permission Problem

Posted by Noah Slater <ns...@tumbolia.org>.
On 17 Jun 2010, at 12:19, afshin afzali wrote:

> After changing the permissions to 646 (I know this causes security issue)
> the problem solved!

Have you followed the instructions in the correct README file?

They include commands to sort out permissions in a secure manner.

Specifically, chown them to the couchdb user and put the perms back to 644, or less.