If you want to be particularly xtraordinary, there's a hack to it.
1. If the person you want to hide this stuff from is not very
Linux-aware, then he wouldn't:
A. know of Linux ACL's.
B. If you hide the ACL commands (getfacl, setfacl) somewhere, he
wouldn't know where is this "somewhere" and he wouldn't know that
there are ACLs implemented.
So you get a separate partition with access lists and set the extra
ACL permissions for the files you want.
2. If the root user you're trying to fool with isn't that st00pid, but
is still a moron, then you do the following:
A. Mask the executable you don't want executed by root by renaming it
to something like... two spaces [$ mv MyExecutable " " or something
of that calibre.
B. Make a small C/C++ program that will check the EUID on call and if
it's not root, will execute your 'hidden' file.
The code for the program:
--------------------------------------
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
// oh, let's make the code really big
#include <iostream.h>
// if you're lazy enuff to skip the iostream class name
// every time you use cout ;-)
using namespace std;
int main()
{
if (geteuid() == 0) // checks if this is root calling
{ // write a stupid message on the screen to fool root
cout<<"Execution error 0C0000:FFA122"<<endl;
// then just quit
return 1;
}
// otherwise just execute your hidden command
int retcode = system("./HiddenFileName");
}
--------------------------------------
Compile, give it the original application name you want to hide from...
Be warned that this is a dirty hack. But fools the unsuspecting
tresspasser ;-)
You can make the check for any other user, not just root (euid 0).
--- In [email protected], open source <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I have a application which runs on a user
> permission . In linus as usual root can access the
> files. Is there anyway that we can prevent the root
> from accessing these files or starting this
> application . i need the directories and files are
> only accessible via the user who owns the file .
>
> thanks
>
> /arun
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/0XFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/dubailug/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/