Solved

Is it possible to know the user label permission for a particular file at server side?

Posted on 2004-04-27
9
129 Views
Last Modified: 2010-03-31
Hi,
        I need to execute a script at the rmid server. And I want the server to be strict enough to check the user label permission for client before executing that script. One possiblity is that server can do some thing like 'ls -l' to get the file permission and split it to collect the group id. Then check whether the client is a member of that group. This is not a cleaner way and is also OS specific. Can anyone please suggest me any other approach for this problem?

Thanks,
Manjari
0
Comment
Question by:manjari1
  • 3
  • 3
9 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10927878
>>And I want the server to be strict enough to check the user label permission for client before executing that script.

What makes you think it won't do that automatically?
0
 

Author Comment

by:manjari1
ID: 10927914
I want to implement it in java. By default the rmid server is assigned  "All permissionPolicy". Changing the policy file and specifying the valid user lists for each script doesn't sound good. So I want to handle it while executing the command.

Thanks,
Manjari.
0
 
LVL 92

Expert Comment

by:objects
ID: 10934368
Easiest to let the OS to handle it by running the script as whatever user is making the calling using sudo or something similiar.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:manjari1
ID: 10935284
Thank you for your responses.

Here the server is going to execute the script on behalf of the client. Definitely the server is having permission to execute any script. The client will just send a command to server( which might be running on some other location) for execution of a script and the client doesn't need to sudo as a particular group user. The server has the information about it's client. But it just needs to be smart enough to retrieve the user permission from a file.

I don't know whether it's possible to extract whether the user has execution permission on a script through java. Any pointers on what to do regarding this.


Thanks,
Manjari.

0
 
LVL 92

Expert Comment

by:objects
ID: 10935353
realised all that, thats why I was suggesting using an OS utility to run the script as the correct user. That would require knowing there password of course.

Otherwise you're probably stuck with using Runtime.exec() to determine the permissions and handling it yourself. Pretty yucky solution really.
0
 

Author Comment

by:manjari1
ID: 10935376
Could you please elaborate a little how to use OS utility in this front?

Thanks,
Manjari
0
 
LVL 92

Accepted Solution

by:
objects earned 125 total points
ID: 10935388
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
basic hardware to learn oop advanced design patterns 3 88
network + 7 80
java.io.BufferedReader   readLine()  //returns the entire file ? 4 60
expectj telnet failing 5 26
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now