Update the torrc in GitHub Actions #24937
-
Hello there, I have a project in which I have to make requests via the tor service. I tried to do so:
But I get the following error:
Is there any way I can modify my torrc for my Github Action to run? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
This doesn’t work because of how shell redirection works: If you do
what happens is:
That redirect is done by the shell that executes your command, it is not part of the To make it work you need to make the process that writes to the file run as root. Two common solutions:
|
Beta Was this translation helpful? Give feedback.
-
Re 2: Does |
Beta Was this translation helpful? Give feedback.
-
I meant for it to, thank you for the catch! I’ve fixed the example. 😅 |
Beta Was this translation helpful? Give feedback.
-
Thanks, this worked as expected! I faced another issue later on, but this will have its own new topic :slight_smile: |
Beta Was this translation helpful? Give feedback.
This doesn’t work because of how shell redirection works: If you do
what happens is:
sudo echo "ControlPort 9051"
is executed/etc/tor/torrc
That redirect is done by the shell that executes your command, it is not part of the
sudo
command, so it runs with regular user rights. Onlyecho
runs as root. 😅To make it work you need to make the process that writes to the file run as root. Two common solutions:
bash -c
: