Results 1 to 2 of 2

Thread: how to make application for changing/modify file permission

  1. #1
    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.

  2. #2
    Join Date
    May 2009
    Posts
    529

    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.

Similar Threads

  1. Replies: 3
    Last Post: 07-01-2014, 09:48 AM
  2. Replies: 8
    Last Post: 21-09-2011, 01:47 PM
  3. How to gain file permission to modify windows registry
    By Elettra in forum Operating Systems
    Replies: 5
    Last Post: 06-07-2011, 07:04 AM
  4. Replies: 3
    Last Post: 20-03-2011, 05:40 AM
  5. Difference between Full control and Modify permission?
    By Praveen P in forum Windows Server Help
    Replies: 2
    Last Post: 11-12-2008, 03:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,657,051.78589 seconds with 17 queries