How do you change file permissions in Java using NIO library on Windows 7
<p>I'm trying to write code that starts with a Path object that is for a specific file and makes it so the owner of the file no longer has permissions to move it, delete it, or modify it, but they can still read it. Also need to make sure that this can be undone, as well as maintain unrestricted access for administrators at all times.</p>

<p>One of my main problems is that I can't figure out how to get the user profile names and group names that are in the system.</p>

<p>An in-depth explanation would be fantastic.</p>