2

So from what I understand, SUID makes so that when you execute a file, you're basically executing it under root, right? Now I made this file, and whenever I try to run it, I get a permission denied error:

[unu@aaw aaa8]$ ll fufa1
-rws--xrwx. 1 root root 34 Nov 30 10:41 fufa1
[unu@aaw aaa8]$ cat fufa1
#!/bin/bash
cat /var/log/messages
[unu@aaw aaa8]$ ./fufa1
cat: /var/log/messages: Permission denied

So what I'm trying to do is execute a bash script from a file with root SUID on another user, but I can't. So what's the problem?

0 Answers0