📁
GoReplay
  • Build software better, together
  • Getting-Started
  • Home
    • [PRO]-Recording-and-replaying-keep-alive-TCP-sessions
    • [PRO]-Replaying-Binary-protocols
    • [PRO]-Using-S3-for-storing-and-replaying-traffic
    • Capturing-and-replaying-traffic
    • Commercial-FAQ
    • Commercial-Support
    • Compilation
    • Dealing-with-missing-requests-and-responses
    • Development-Setup
    • Distributed-configuration
    • Exporting-to-ElasticSearch
    • FAQ
    • Middleware
    • Rate-limiting
    • Replaying-HTTP-traffic
    • Request-filtering
    • Request-rewriting
    • Running-as-non-root-user
    • Running-on-Windows
    • Saving-and-Replaying-from-file
    • Streaming-from-and-to-Apache-Kafka
    • The-Basics
    • Troubleshooting
Powered by GitBook
On this page

Was this helpful?

  1. Home

Running-as-non-root-user

You can enable Gor for non-root users in a secure method by using the following commands

# Following commands assume that you put `gor` binary to /usr/local/bin
addgroup gor
adduser <username> gor
chgrp gor /usr/local/bin/gor
chmod 0750 /usr/local/bin/gor
setcap "cap_net_raw,cap_net_admin+eip" /usr/local/bin/gor

As a brief explanation of the above.

  • We create a group called gor.

  • We then add the user you want to the new group so they will be able to use gor without sudo

  • We then change the user/group of gor binary the new group.

  • We then make sure the permissions are set on gor binary so that members of the group can execute it but other normal users cannot.

  • We then use setcap to give the CAP_NET_RAW and CAP_NET_ADMIN privilege to the executable when it runs. This is so that Gor can open its raw socket which is not normally permitted unless you are root.

PreviousRequest-rewritingNextRunning-on-Windows

Last updated 4 years ago

Was this helpful?