Questions tagged [setuid]
The setuid tag has no summary.
204 questions
2 votes
2 answers
91 views
Set uid bit not recognised
I have a problem whereby an executable which has the setuid bit set and is owned by root is not having its euid set to 0 sometimes. I'm running Debian 11 on a small SBC for a control application. I ...
1 vote
1 answer
59 views
Killing a process with ruser root and euser user
I'm learning linux permissions and confused about the permissions for killing a process. First, from kill(2) manpage: For a process to have permission to send a signal it must either be privileged (...
3 votes
1 answer
81 views
File acess permissions missing after setuid() system call
I have a file access problem in a self developed daemon process after a setuid() system call. I already post this question to SO but the impression is that the problem is not C++ related but Linux ...
1 vote
1 answer
115 views
What security risks arise from granting unprivileged users the ability to perform overlay mounts?
I'm writing a program to allow unprivileged users to mount overlay filesystems using a setuid binary. I've implemented a few safeguards to improve the program's security, but I'd like a more ...
0 votes
0 answers
241 views
Podman Outer Container Fails to Gracefully Stop with SIGTERM When cap_setuid and cap_setgid Are Enabled
In a Podman-in-Podman case, the outer container fails to stop gracefully with SIGTERM when specific capabilities (cap_setuid and cap_setgid) are set to enable the use of machinectl and inner ...
0 votes
1 answer
280 views
setuid not working with C code and system() call [duplicate]
I have NICE-DCV installed in RHEL-8.10 and as root doing a dcv list-sessions shows all sessions on the system. But if a user does dcv list-sessions then the output from that is only their session ...
0 votes
1 answer
102 views
Can Apache 2.4 run setuid root CGI binaries?
Note that I'm not asking about suEXEC, because the binary must be setuid root, and suEXEC doesn't allow root to execute CGI programs. I need to carry out a one-time configuration during system ...
1 vote
1 answer
108 views
setuid root problem with sticky bit: curl can't write to a new/empty directory in /tmp [duplicate]
I'm carrying out a one-off configuration operation which requires a remote client to communicate with a remote server. The client runs Apache, which runs a configure binary, which fetches various ...
0 votes
0 answers
29 views
Program not running with permission of the owner even though SUID is set [duplicate]
I have a program ./prog that is owned by root and has the SUID bit set. Permission: -rwsr-sr-x 1 root Then I check the EUID by geteuid() but when I run this (as a user), the output EUID is still my ...
1 vote
1 answer
1k views
Permission denied when opening a file in gdb
I'm implementing some CTF challenges. The flags are in some text files, that get read from the programs. To protect the flags I have changed the owner of the files, but have set the setuid to the ...
0 votes
1 answer
87 views
Can't the user which is executing the program access the not permissible files if the SETUID is set? [duplicate]
I have two users first being ace and the second being ej ace has a file in its home directory, which is a shell script, with the following permission set ( setuid i have used ) -rwsr--r-x 1 ace ace 15 ...
1 vote
1 answer
192 views
How to make the script, configured via sendmail aliases file, run as the user to whom that email is addressed?
I have a FreeBSD box running sendmail 8.16. I have several system users (test robots): robot1, robot2 and robot3 and I would like them to be controlled by emails. First of all they should be able to ...
0 votes
2 answers
712 views
How to make command `id` print different real and effective UID in Ubuntu
The info page of command id states that it will output the effective user ID if different from the real user ID. I have been trying to achieve that somehow, running the command with the Bash shell as ...
4 votes
1 answer
853 views
effective vs real user ID : why doesn't it return root as effective ID in my example?
I did some reading about the difference between real and effective user ID. I thought I understood, but I have a doubt : according to my comprehension, in the example below the command $ id -un should ...
1 vote
0 answers
61 views
Why does setreuid have this limitation on setting ruid to current value of suid?
According to the docs for setreuid: Unprivileged processes may only set the effective user ID to the real user ID, the effective user ID, or the saved set-user-ID. Unprivileged users may only set the ...