newgrp not working in startup script
This might just be a Linux 101 issue but still can't work out why.
We have a custom built AMI with Docker installed and want to grant the Coder user access to use Docker.
Since the Coder user doesn't exist on the AMI yet I added the commands to the startup_script in resource "coder_agent"
The script runs and it doesn't appear to work.
We run the same command in the terminal and it works.
So maybe something strange is happening with the session?
6 Replies
<#1339381453821317161>
Category
Help needed
Product
code-server
Platform
Windows
Logs
Please post any relevant logs/error messages.
*linux OS
@Chris2pi
newgrp
can only be used in an interactive session because it starts a new shell
so, it seems you can't use it in this context
you should create the coder
user within the AMI and add that group to itThanks for that. Ok just linux 101, yes we did make the coder user in the AMI and it seems to be working.
sounds good
@Phorcys closed the thread.