incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: eacces error
Date Thu, 04 Oct 2012 16:46:28 GMT
Moving to a proper OTP release *is* the fix. There's a Dix on the two
ways erlang starts. One is called "interactive" and is how couch and,
I think, bigcouch are started. That mode is the one that includes your
current working dir. The other mode, the name escapes me, does not.

Sent from the ocean floor

On 4 Oct 2012, at 15:13, Dave Cottlehuber <dch@jsonified.com> wrote:

> On 4 October 2012 12:58, Noah Slater <nslater@tumbolia.org> wrote:
>> Should we patch this before the move to an OTP system? Does anybody have a
>> patch?
>
> I'll take a look, something like chdir to /usr/local/var/run/couchdb
> or similar might be an approach. I think on Windows at least it
> matters where CouchDB is running from, but it uses a different method
> of starting up vs *nix so that should be OK.
>
> @Martin does this patch fix it? Just ensure your /usr/* paths match up.
>
> --- /usr/local/bin/couchdb    2012-10-04 16:06:16.000000000 +0200
> +++ /tmp/couchdb    2012-10-04 16:06:02.000000000 +0200
> @@ -27,6 +27,7 @@
> KILL=false
> LOCAL_CONFIG_DIR=/usr/local/etc/couchdb/local.d
> LOCAL_CONFIG_FILE=/usr/local/etc/couchdb/local.ini
> +LOCAL_RUN_DIR=/usr/local/var/run/couchdb/
> PID_FILE=/usr/local/var/run/couchdb/couchdb.pid
> RECURSED=false
> RESET_CONFIG=true
> @@ -220,13 +221,16 @@
>         check_environment
>     fi
>     interactive_option="+Bd -noinput"
> +    working_dir=$PWD
>     if test "$INTERACTIVE" = "true"; then
>         interactive_option=""
> +        working_dir=$LOCAL_RUN_DIR
>     fi
>     if test "$BACKGROUND" = "true"; then
>         touch $PID_FILE
>         interactive_option="+Bd -noinput"
>     fi
> +    cd $working_dir
>     command="/usr/local/opt/erlang/bin/erl $interactive_option
> $ERL_START_OPTIONS \
>         -env ERL_LIBS
> /usr/local/Cellar/couchdb/HEAD/lib/couchdb/erlang/lib -couch_ini
> $start_arguments -s couch"
>     if test "$BACKGROUND" = "true" -a "$RECURSED" = "false"; then
>
> I've got a patch against master if this works.
>
> A+
> Dave

Mime
View raw message