Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 21-03-2012
Member
 
Join Date: Mar 2012
Posts: 1
sad how to make application for changing/modify file permission

dear tech arena...

i need your help..
actually i feels difficult to make application for modify file permission using java client server.
i had found a lot of information about it, but i'm still can't take the relationship and the answer between those information . i can't get the conclusion of it.
please giv eme the clue.
Reply With Quote
  #2  
Old 28-04-2012
Member
 
Join Date: May 2009
Posts: 525
Re: how to make application for changing/modify file permission

File access permissions are controlled by blocks with the following syntax:


Code:
    grant {
        permission java.io.FilePermission "filePath", "permissionList";
    };
where filePath is the path of the file, of part of the file system to be accessed, and permissionList is a comma-separated list of [some combination of] the words read, write, delete and execute. Note that filePath can make use of two wildcards that should appear at the end of filePath. A '*' means 'all files in current directory', and a '-' means 'all files in the current directory and [recusively] all subdirectories'. There can be multiple permission lines. For example


Code:
    grant {
        permission java.io.FilePermission "/home/eric/-", "read";
        permission java.io.FilePermission "/home/eric/temp/*", "read, write, delete";
    }
A Windows example might be:

Code:
    grant {
        permission java.io.FilePermission "C:\\home\\download\\-", "read";
        permission java.io.FilePermission "C:\\home\\download\\temp\\*", "read, write, delete";
    }
Note the double \\'s for Windows.

grants read access to all files and subdirectories in '/home/eric/', but only files in '/home/eric/temp' can be written or deleted.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "how to make application for changing/modify file permission"
Thread Thread Starter Forum Replies Last Post
Fixed: The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID Jolie-Pitt Windows x64 Edition 3 07-01-2014 09:48 AM
Permission denied message while trying to modify music file properties AkshatShetty Operating Systems 8 21-09-2011 01:47 PM
How to gain file permission to modify windows registry Elettra Operating Systems 5 06-07-2011 07:04 AM
Windows 7 error: "You need permission to perform this action. You require permission from PCNAME-PC\USERNAME to make changes to this file." Nuryn Operating Systems 3 20-03-2011 05:40 AM
Difference between Full control and Modify permission? Praveen P Windows Server Help 2 11-12-2008 03:44 PM


All times are GMT +5.5. The time now is 02:41 AM.