Ask coding questions

← Back to all posts
Could Repl.it Allow Root User Access Just on Apt?
AmazingMech2418

Would it be possible for Repl.it to allow sudo just on the apt/apt-get commands?

https://askubuntu.com/questions/612256/how-do-i-allow-a-user-to-only-run-the-apt-get-update-command-with-sudo and https://askubuntu.com/questions/612256/how-do-i-allow-a-user-to-only-run-the-apt-get-update-command-with-sudo should help if you decide to do this.

install-pkg doesn't give full root access for building applications, so attempting to build different languages, including COBOL, doesn't work. Enabling sudo in install-pkg or apt/apt-get would allow these languages to be used on Repl.it without you all at Repl.it having to add them directly. Languages like Fortran do work without root access, but not COBOL and likely some others. It seems like Repl.it has been putting a lot of focus on languages there are work-arounds for rather than languages like COBOL that you cannot work around.

@amasad What do you think?

Voters
Froggo-School
mhnsn
sekosoftware
OLEGTELENKOV
JamesLee1
Shaqalito
wiz64
programmeruser
Andy_4sberg
19wintersp
Comments
hotnewtop
19wintersp

This could be really useful, or a system in which these packages can be installed securely by Replit.

Andy_4sberg

I agree, @19wintersp! Please vote this post up for more people to see (and the comments if u want)!

programmeruser
Andy_4sberg

This is truly AWESOME, @programmeruser.

19wintersp

@programmeruser Yeah, saw this, and it looks really cool. Planning on making something which takes advantage of this.

AmazingMech2418

@programmeruser I saw Nix as a language, but I was wondering what it was for! This is really cool! Time to port my Ada pi approximator to Repl.it! LOL!

programmeruser

Yes, we need this. Upvote this feedback post: https://repl.it/feedback/p/root-access-in-the-linux-containers

Froggo-School

Yeah. Along with allowing users to perform add-apt-repository (although, allowing users to add their repos is less likely as they may contain malware).

JamesLee1

Working with bash on Repl.it is very limiting if we can't add packages. I am trying to work with dialog boxes which are not installed and cannot be installed.

AmazingMech2418

@JamesLee1 Try using a Nix repl.

CSharpIsGud

Having any root access at all is a big risk even for just one program.
How would it tell what you were running is apt? What if someone made a program and named it the same as apt and then put it in PATH?
There are way more ways to break out of a VM when you have root access than if you don't.

programmeruser
programmeruser

@CSharpIsGud well, they could just make the apt binary suid

CSharpIsGud

@programmeruser Does apt not run scripts for pre install post install etc? You don't want those running as root either.