[erlang-questions] setuid

Ville Silventoinen <>
Thu Jun 5 11:53:06 CEST 2008


I'm new to the world of Erlang and I'm just trying some things out (very 
impressive language!). I got interested in Erlang after seeing Joe 
Armstrong's presentation in this year's ACCU conference in Oxford and 
reading his excellent book.

I'm writing a prototype of a network filesystem using the fuserl package. 
So far so good, I have a little network filesystem that uses fuserl at the 
client-side and communicates with a gateway written with gen_server, which 
does the file system operations.

One of the things I'd like to do is to map the client-side Unix UID and 
GID numbers (#fuse_ctx.uid and #fuse_ctx.gid) to different UID and GID 
numbers at the gateway. I wrote a little linked in C module that allows me 
to call setuid, seteuid, etc. from Erlang, but I'm not sure how this will 
affect other processes doing file operations in the Erlang runtime 
environment. Would setuid change the UID for all Erlang processes or for 
just the process that called it?

I'll find out the answer soon by experimenting, but I thought I should ask 
if anyone has better ideas!


More information about the erlang-questions mailing list