permissions of the script is fine and the script runs fine
however, if I run 'sudo' i get the following
sudo: The "no new privileges" flag is set, which prevents sudo from running as root. sudo: If sudo is running in a container, you may need to adjust the container configuration to disable the flag.
the user i am running transmission-daemon as,
has permissions to run sudo,
how can i allow transmission-daemon to run the same commands ,
via download complete script,
that i can usually run as a user.
my use case is to restart vpn after download completes.
tried
running transmission-daemon as root,
it works,
but it fails to read the profile created by the user
found a solution, was quite simple actually, sharing in case anyone stumbles upon this
in the service that runs transmission-daemon
sudo nano /etc/systemd/system/multi-user.target.wants/transmission-daemon.service
change NoNewPrivileges=true
to NoNewPrivileges=false
[Unit]
Description=Transmission BitTorrent Daemon
After=network.target
[Service]
User=user
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-error
ExecStop=/bin/kill -s STOP $MAINPID
ExecReload=/bin/kill -s HUP $MAINPID
NoNewPrivileges=false
[Install]
WantedBy=multi-user.target
that's the flag that needs to be changed