Top "Setuid" questions

`setuid` is a file permission flag under Unix-like systems that will run an executable with the file owner's permissions rather than the invoking user's. On some systems (FreeBSD), it further works identically to the related `setgid` flag on directories, causing new files to inherit the directory's permissions rather than the current user's.

setgid() fails - operation not permitted

I created a setuid program in C. The executable looks like this: -r-s-r-s--- 1 root users 13073 Jun 15 21:56 server I execute the …

c linux permissions setuid
Why do my setuid root bash shell scripts not work?

I created this simple script to allow the user to remove files created by the web server in his home …

bash permissions chmod chown setuid
What does connecting to own network daemon mean?

i'm currently doing the bandit wargames from overthewire.org (for those of you who don't know it's a website with …

networking daemon setuid bandit
Can i setuid for perl script?

I made a perl script to change owner of a file owned by some other user. Script is complete. My …

c apache perl unix setuid
How to successfully run Perl script with setuid() when used as cgi-bin?

I have a Perl script that is called either via Apache or on the command-line. For testing purposes, I pass …

perl apache cgi-bin setuid suexec
seteuid/geteuid: Program always has root id

I'm currently trying to figure out how the SUID-bit and the corresponding functions seteuid and geteuid work. So I wrote …

c permissions setuid suid
Why do I need setuid(0) within a setuid-root C program that calls an administrative program with system()?

I had to do a dirty Linux hack for somebody so they could start a printer with the cupsenable printername …

c unix setuid privilege-elevation
setuid on an executable doesn't seem to work

I wrote a small C utility called killSPR to kill the following processes on my RHEL box. The idea is …

linux process c setuid
Linux C programming execute as user

I have an program which I run as root. I would like the program to execute another application as a …

c linux su setuid