Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File permission in java security

 
xeon costa
Greenhorn
Posts: 15
Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've a java platform made by myself that offers a multicast communication. This platform is running in daemon and if a user want to send some multicast message, just have to call the interface method send(String group, Message m), and the platform will deliver the message to the group. There is some configuration files saved locally that is where the groups are specified. The user can't update the configuration files, only the admin user can do that.

For example, the admin user defined Group1, that includes Host1, Host2 and Host4. Group2 includes Host2 and Host3. If the user want to send the message to Group1, just has to call the method like this:


I would like to use java access control to allow only the admin user access these configuration files. Other users can't read or write to these files.

How can I do this using the Java Security platform?

Thanks,
 
Maarten Bodewes
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you use Java for this? Just make the config file only available to the account of the deamon, not any old user. The users only get access to the functions offered by the deamon.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic