It didn't resolve the problem. Permission denied.Have you triedchmod +x prog
Yes, I know but I'm trying to find out why I cannot execute the file.It's seriously bad form to make a SUID root executable world-writable.
dik09@domain:~ % sudo ./prog
Password:
Sorry, user dik09 is not allowed to execute './prog' as root on domain.
dik09 ALL=(root) NOPASSWD: /home/dik09/prog
The same problem../prog
is not the same as/home/dik09/prog
. So trysudo /home/dik09/prog
.
dik09@domain:~ % sudo /home/dik09/prog
Password:
Sorry, user dik09 is not allowed to execute '/home/dik09/prog' as root on domain.
481557 -rwxr-xr-x 1 root users 7.2K Apr 10 15:23:31 2017 prog
481553 -rw-r--r-- 1 dik09 users 78B Apr 10 15:23:08 2017 prog.c
root@domain:/home/dik09 # ./prog
./prog: Permission denied
root@hpv:/home/dik09 # /usr/sbin/prog
Hello World!
Yes, I forgot about that...What doesmount | grep home
show?
root@domain:~ # mount | grep home
/dev/nvd0p5 on /home (ufs, local, noexec, nosuid, soft-updates)
dik09@domain: % cc -Wall test_2.c -o test_cc
error: unable to open output file '/tmp/test_2-8c100f.o': 'Permission denied'
1 error generated.