Setuid command seems to not working
I had windows application installed on Linux computer, for example, in Demo directory. And in Demo folder, I have files directories structure as follow
-rwxrwxrwx spuser spuser aaa.dll
-rwxrwxrwx spuser spuser bbb.ttf
-rwxrwxrwx spuser spuser ccc.ref
-rwsrwxrwx spuser spuser DemoApp.EXE <= I've set setuid command on this file
drwxrwxrwx spuser spuser icons
drwxrwxrwx spuser spuser secure
drwxrwxr-- spuser spuser lang
If I run DemoApp.EXE with spuser privilege, it work fine, DemoApp.EXE can read files within lang directory. But when I run DemoApp.EXE with ordinary user privilege, it have error that say cannot read files within lang directory that I set it read-only for others (as above directories structure). I try to run both in Linux mint with WINE or run this program on Windows pc, it have same result.
Please advise me, and sorry for my bad english.
Re: Setuid command seems to not working
Hi whiteking. Welcome to the forums
I'm afraid setuid only works for programs that run inside the Linux environment.
I'm guessing DemoApp.EXE is a Windows application and run either under Windows, or under Wine.
Under Windows proper, those permission don't even exist since NTFS does not support them. When executed in Linux through Wine, Linux does not actually execute them (via the dynamic loader: /lib64/ld-linux-x86-64.so.2), but it is read as input file to Wine, which in its effort to emulate Windows does not support Setuid.
Does that help? Let us know if you have more questions.
Come here often and have fun.
Tags for this Thread