9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Danny Wilkins via 9fans" <9fans@9fans.net>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] rc-httpd cgi heredocs
Date: Tue, 21 Oct 2025 11:54:53 -0400	[thread overview]
Message-ID: <1B798008-74A7-4CD3-8BD3-5E159605860C@sdf.org> (raw)
In-Reply-To: <aPbU3WePhxAOcYNH@duke.tekk.in>

Ended up getting a response on IRC:
This was because CGI scripts are run as none, who has no write permissions. It was fixed by adding a ramfs call to the script to make a none-writable /tmp

On October 20, 2025 8:36:11 PM EDT, Danny Wilkins via 9fans <9fans@9fans.net> wrote:
> (Sorry if the last message got through, misremembered m as new mail in nedmail and it forwarded the first message in my inbox)
> 
> I'm messing around with cgi scripts in rc-httpd to store my html templates, however when I try to execute them, the script
> errors out because it can't open /tmp/herex..... . I assume herefiles are 'fake' and just throw a file in /tmp, but what do
> I need to do to let cgi scripts use them? I'm invoking my script with the cgi handler and I don't see any special handling
> for tmp in there.
> 
> Thanks,
> Danny
> y

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T8ffed3c3ff150047-Mf7216d33fd4c227503885ab8
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

      reply	other threads:[~2025-10-21 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21  0:36 Danny Wilkins via 9fans
2025-10-21 15:54 ` Danny Wilkins via 9fans [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1B798008-74A7-4CD3-8BD3-5E159605860C@sdf.org \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).