Questions tagged [setuid]

The tag has no usage guidance.

15 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
142 views

LXC: Have rootfs mounted without nosuid

I have the container's rootfs in a volume mounted with the nosuid option. When I start the container, its / mounted is then also mounted nosuid, which breaks programs such as sudo. How can I avoid ...
2
votes
0answers
72 views

modprobe in setuid contextmodprobe in setuid context

In CVE-2017-0358, author notes that The issue is that /sbin/modprobe is not designed to run in a setuid context. As the manpage of modprobe explicitly points out The MODPROBE_OPTIONS environment ...
1
vote
0answers
68 views

seteuid fails even when all UIDs are 0

I have some C++ code on a Linux machine whose purpose is to run some code as an arbitrary user. #include <sys/capability.h> #include <unistd.h> void doAsUser(uid_t uid) { if (...
1
vote
0answers
68 views

Setuid program loses group memberships

I am upgrading an older SuSE-13.2 box to Leap-15. I have done a fresh Leap-15.0 install and ported over the source code that we ran on the 13.2 box. I builds fine but I am having an issue. The program ...
1
vote
0answers
183 views

Confused about using `setuid` on a FreeBSD mounted dataset to ensure all files/dirs have a fixed owner?

Initially I thought that what I'm trying to do was simple. But the more I look at FreeBSD man pages, the more confused I'm getting about whether it's even possible. I have a zfs pool that is used for ...
1
vote
0answers
116 views

setuid confusion, change owner of files created to particular user:group

I am trying to setup a directory /opt/www in such a way that when a user who belongs to the group django creates/modifies files and directorys within, they are set to owner django and group django. I ...
1
vote
1answer
166 views

python program running as root to open urls via normal user

I have a python program that runs as root one if its functions at the click of a button is to open a webpage. It kept opening the webpage in firefox as root so I try to use setuid with no avail. Here'...
1
vote
0answers
1k views

Python process can't create a file in a directory, keeps getting `permission denied` IOError

I've a directory mnt with 777 permissions: drwxrwxrwx 2 root root 14336 Feb 5 15:52 mnt I've created a bunch of users in the group root from uid to 5204 to 5250. I've a python script that ...
1
vote
1answer
141 views

Darwin strips setuid from interpreter in hash bang execution

This is not exactly a question about how to run a hash bang script. In this situation, a hash bang script exists which doesn't (necessarily) have the u+s permission. Rather, the interpreter has u+s, ...
1
vote
0answers
109 views

Limit program execution to a list of arguments

I would like that my Unix users can only run a specific command insecurecommand with a controlled list of arguments stored in a file. The only solution I have found at this time is to : Create a new ...
1
vote
1answer
488 views

Principle of least privilege: Does Authbind helper really need setuid root, or can it run with cap_net_bind_services?

Does Authbind's helper really need setuid root, or can it run with the CAP_NET_BIND_SERVICES capability and still work?
0
votes
0answers
44 views

Difference between SUID and user namespace

I was reading up on rootless containers which have the possibility to have unprivileged non-root containers where the parent process or tool that starts the application container itself runs as "non-...
0
votes
0answers
44 views

Applying special permission suid & sgid

I was in the processs of learning a bit about the special permission in Linux. Where is find certain anomilies. suid - For executable/files where user subsume the UID/permission of the owner. With ...
0
votes
1answer
57 views

How can I prevent a process to change its setuid bit back to RUID within the process itself

I set my SETUID bit to a non-root user so that the process should take the ownership of that executable file always. But I figured out setuid bit can be changed back to RUID within the script itself. ...
0
votes
0answers
265 views

SETUID and SETGID Behavior

The setup: ~$ ls -l /etc/sudoers -r--r----- 1 root root 614 2017-09-10 20:29 /etc/sudoers ~$ ls -l /etc/shadow -rw-r----- 1 root shadow 794 2011-04-18 11:49 /etc/shadow $ ls -l $(which ht) -rwsr-sr-...