Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

Beginners • seteuid fails Why ?

$
0
0

Code:

$ sudo ls /bin  boot  devetc  home  liblost+found  media  mntopt  proc  root  run  sbin  srv  sys  tmp  usrvar$ cat myerror.c #include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>int main(int argc, char **argv) {    int myerror = seteuid(0) ;  if (myerror == -1) {    perror("unable to setuid");    return 2;  }}$ gcc myerror.c $ ./a.outunable to setuid: Operation not permitted

Statistics: Posted by theoldwizard1 — Sat Jan 31, 2026 8:11 pm



Viewing all articles
Browse latest Browse all 8609

Trending Articles