Hi, i am new to java, and i stuck in between with a folder locking problem.
i want to create a private folder without encrypting the data,
i have two options
1) Either Lock that folder so none of the user (even admin) can't access that private data.
2)Completely hide that folder
looking forward for your suggestion
Thanks in advance :)

Neither of which are options in Java. Those would be OS specific options and you would have to write a JNI library per OS to be able to do something like that, so, if you are going to pursue this course of action, start asking at an OS specific forum how that goal might be accomplished (without any regrad, what-so-ever, to Java) then delevop a native library for that, then use JNI to use that library.

Edit: P.S. you do know that option 2 is no option at all, right? Hidden, is just that "hidden". It's like hiding a chair behind a wall. You can't see it anymore, but, as long as you know it's there, or you know how to search for it, you can still get to it. The only way to "completely" hide something, would require "hiding" it from the OS itself, which means not using the filesystem at all, which means writing bytes directly over the hardware decvice, which would be a dangerous game, as the OS could overwrite it at any time, and your "writing" could mess up the OS, as well.

And locking so that "even Admin" can't get at it is also not possible. Admin has rights to everything on the file system, and for good reason.

Edited 6 Years Ago by masijade: n/a

This article has been dead for over six months. Start a new discussion instead.