this post was submitted on 25 Oct 2025
27 points (93.5% liked)

Selfhosted

53057 readers
719 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Hi, I teach a CS course, and I was wondering if there is a practical way in which to setup a server that would accept student's tar files, run some tests, and show them the results.

I could go "full unix mode" and roll up some accounts let them ssh into a server, scp their their files.... but I was wondering if there is a prepacked solution for this that is nicer to the eye. And I thought maybe you know some.

you are viewing a single comment's thread
view the rest of the comments
[–] dotdi@lemmy.world 3 points 3 weeks ago (6 children)

Absolutely this. Even if you had fancy jails or docker setups for each submission, this will be a nightmare to properly handle. Students DOSing each other exactly before the submission deadline, too.

[–] foggy@lemmy.world 3 points 3 weeks ago* (last edited 3 weeks ago) (5 children)

I mean just for the love of God don't spin up something on your company's infrastructure that accepts file uploads.

Just don't.

If you're reading this and going "well, it's just internal," or "well, it doesn't do much it just accepts this exact file type." My god. Ask your CISA. And if they're okay with it, cool. That's on them.

Unless your whole business is transferring files, don't. And even then... Don't.

And if you're still confused, the answer is to use another company's infrastructure for this. Use Azure. Use AWS. Use Google cloud or even g suites. Don't accept that liability. Let the trillionaires do it.

[–] planish@sh.itjust.works 1 points 3 weeks ago (2 children)

I mean if you put up an Internet-facing unauthenticated file acceptor it will quickly become stuffed with all sorts of garbage and aspiring malware. You definitely don't want to hook that up to an untar and exec loop, even with some notion of sandboxing. It will just start mining Bitcoins or sending spam or something.

But if it is built properly, with only authorized users being able to upload stuff, and a basic understanding of not dropping stuff where the web server will happily execute every PHP web shell someone sticks in the slot, and the leverage to threaten people into not uploading pictures of their own or others' butts or Iron Man (2009), I don't see why all but the file-uploading professionals should immediately give up.

[–] lucullus@discuss.tchncs.de 1 points 1 week ago (1 children)

Security noob here. Would it be sufficient (in addition to only local authorized access) to directly put the file in an unprivileged container, watching its log output? And of course limiting resource use and execution time of the container (don't know if common container tools like docker or podman have a way to limit resources out of the box)

So lets say a simple interface for the file upload behind an authentication service, based on lets say python cgi, ramping up an unprivileged nonroot docker container, killing the container after a fixed time (a few seconds).

load more comments (2 replies)
load more comments (2 replies)