views:

8

answers:

0

Hello everybody,

I've been searching for several days but I'm not able to find the solution.

I want to write an aplication that can access to a folder where the user runnig the application has no access. That is.

  • There is a folder F with some files.
  • User A can read/write folder F.
  • User B cannot read/write folder F.
  • User B must use the application to 'download/upload' files to folder F.

The application should change the security context and access this folder F as user A (the user name and password are stored in variables in the java code.

I've been testing with java.naming.Context and so on but when I authenticate with the correct user, I'm still not able to access F.

Someone can write few lines to show me how to do it? Any document that can help me?

The user runs XP Pro, the folder is in Windows 2003 Server.

Thanks in advance.