Skip to content

Kernel before 5.6.X (April 2020): superuser rights needed / setsockopt: Operation not permitted #4

@fcmircea

Description

@fcmircea

Hello,

I'm trying to run BindToInterface in a script as part of a systemd service that runs under its own separate user.

The service file looks like this:

[Unit]
Description=Deluge Bittorrent Client Daemon
Documentation=man:deluged
After=network-online.target mnt-storage.mount
Requires=mnt-storage.mount
BindsTo=mnt-storage.mount

[Service]
Type=simple
UMask=000

ExecStart=/bin/bash /media/bti/deluged.sh

Restart=on-failure

# Time to wait before forcefully stopped.
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target

The script is as follows:

#!/bin/bash

BIND_INTERFACE=eno2 DNS_OVERRIDE_IP=8.8.8.8 BIND_EXCLUDE=127.0.0.1,192.168. LD_PRELOAD=/media/bti/bindToInterface.so /usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning

when executing:

systemctl status deluged

I get the following output:

bash[503711]: setsockopt: Operation not permitted

Is there a way to run your tool without elevated privileges?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions