File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Change these Folder Security Permission?

 
J. Insi
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings everyone!!
Since I'm doing Swing-ing in this Windows Environment.
I didn't realize that the Permission issues are important also.

Geeezzz... Take a look at this image;



Uploaded with ImageShack.us

Is there anyway we do changing these permission values through JAVA?
Because I realized it can't be done changing in Registry, it's not the place to do that. Heheheh.

Any clue?
 
Rob Spoor
Sheriff
Pie
Posts: 20368
43
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to use JNI. Perhaps someone has already done this and has written a public library. Use "ACL" in your search.
 
Vishwanathan Nagarajan
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob,


Please go through the following link,

http://download.oracle.com/javase/1.4.2/docs/guide/security/permissions.html


Cheers.

 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vishwanathan Nagarajan wrote:
Please go through the following link,

http://download.oracle.com/javase/1.4.2/docs/guide/security/permissions.html


I don't see the relevance! That link is concerned with permissions from the point of view of Java security but the OP wants to change permissions of files on the underlying file system. OK, both are concerted with security but your reference is adding additional access constraints over and above those imposed by the underlying file system. For example, you might set up a Java security permission to edit the /etc/passwrd file but unless you are running as root (or some idiot has changed the underlying permissions of the file /etc/passwrd) you won't even be able to read it.
 
J. Insi
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GEEEZZZ...

is that means we (from java) doesnt have the API for it?
 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
J. Insi wrote:GEEEZZZ...

is that means we (from java) doesnt have the API for it?


Java 7 will allow better control over file permissions but even then you will need to be the right sort of user to set some file/directory permissions. No language should allow one to bypass the security constraints imposed by the OS but I do feel that the current ridiculous minimal approach was badly thought out in the first place and has existed for far too long.
 
J. Insi
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the strange case encountered is that
i am as the administrator in this laptop. (so I do have the right, didn't I ?)

And, I dunno why.

My installer created by Advanced Installer to bundle my java apps (developed by me) is fine.
Until its done the installation (copying the files, etc).

So thus, the directory and its file already copied there... but
at the time I run the java app I installed there.... well, the permission issues comes.

Very strange.
Dat's why I'm asking this.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic