S
S
Sergey Shchetilin2019-01-25 11:40:35
JavaScript
Sergey Shchetilin, 2019-01-25 11:40:35

Is it safe to use SUID for a system update script?

I have Ubuntu 18.04 on my home laptop
Wrote a small script that allows you to update the system with one click

#!/bin/bash
apt update >/home/USER_NAME/update.log
apt list --upgradable >/home/USER_NAME/upgradable.log
apt-get -y upgrade >/home/USER_NAME/upgrade.log

The owner is root, the file is in the home directory and an icon (link) is displayed on the quick access panel.
SUID and Sticky bits are installed.
What are the pitfalls of such a solution (in terms of security)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
IceJOKER, 2016-05-30
@IceJOKER

e.preventDefault();//you need to hang the handler on the link itself, and not on the picture, etc.

S
Saboteur, 2019-01-30
@schetilin

SUID may not work on scripts, only on binaries. Check first.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question