[erlang-questions] Erlang on EC2 - Filesystem errors?

Paul Davis paul.joseph.davis@REDACTED
Thu Oct 15 00:41:03 CEST 2009


On Wed, Oct 14, 2009 at 6:22 PM, Scott Lystig Fritchie
<fritchie@REDACTED> wrote:
> Paul Davis <paul.joseph.davis@REDACTED> wrote:
>
> pd> {error_logger,{{2009,10,14},{1,42,33}},std_error,"File operation
> pd> error: eacces. Target: .. Function: read_file_info. Process:
> pd> code_server."}
>
> Paul, the most common way I've run into this is to do the following as
> the superuser (and doesn't require EC2):
>
>    mkdir -p /root/some-private-directory
>    cd /root/some-private-directory
>    chown root .
>    chmod 700 .
>    su some-non-privileged-user -c "erl blah blah blah..."
>
> The "some-non-privileged-user" user can't read anything in the current
> directory, which is still /root/some-private-directory.
>
> -Scott
>

Scott,

I'm not sure I follow. You mean that running with a $CWD that the user
does not have write permissions on can cause the code server to fail
when reading beam files from $PREFIX/lib/erlang/* ? Or even from the
user's home directory?

I tried a simplistic erl session in a directory I don't have write
permissions on, but nothing crazy happened:

davisp@REDACTED:/root$ touch foo
touch: cannot touch `foo': Permission denied
davisp@REDACTED:/root$ erl
Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [smp:4]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.6.5  (abort with ^G)
1> io:format("How you doin' world?~n", []).
How you doin' world?
ok
2>


Thanks again,
Paul J. Davis


More information about the erlang-questions mailing list