[Haskell-cafe] Problematic fixed "stack ghci" temporary script (parent) directory

Michael Sloan mgsloan at gmail.com
Sun Oct 6 17:06:26 UTC 2019


You can override the temporary directory by setting the TMPDIR environment
variable.

To have this apply to all of your stack invocations, consider putting an
alias in your .bashrc, something like:

$ alias stack="TMPDIR=~/.local/tmp ~/.local/bin/stack"

Note that you might also need to

$ mkdir ~/.local/tmp

-Michael

On Sun, Oct 6, 2019 at 12:36 AM Viktor Dukhovni <ietf-dane at dukhovni.org>
wrote:

>
> When I run "stack ghci", an attempt is made to create a temporary
> directory named:
>
>         /tmp/haskell-stack-ghci/<unique-subdir>
>
> in which various temporary artefacts are stored.  The parent
> directory is created with permissions (0777 & ~umask).
>
> Security issues aside, this can't work reliably on a multi-user
> system.  Does anyone know whether this is something peculiar
> to my FreeBSD setup, or a systemic issue with "stack ghci"?
>
> I don't see the same behaviour with "stack script", though
> if I create a script to run in "/tmp", then ghc is, somewhat
> unexpectely, executed with "-i/tmp/", which also has security
> implications...
>
> --
>         Viktor.
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20191006/1e2d9685/attachment.html>


More information about the Haskell-Cafe mailing list