Unix permissions in Java

F

frank

i am going to explain this as best i can.
we are running on a UNIX system.
my question i think concerns the Java runtime exec. (or maybe Java
itself).

INFO: In unix all users have a default login group. In unix you can
create additional UNIX groups and assign users to these groups. to help
explain the problem say we have 3 users.
user1 default login group is 1234
user2 default login group is 1234
user3 default login group is 1122
in unix if i set permissions on a file for group execute , anybody in
the same login group as me can execute this file.
so only user1 and user2 can execute. user3 permission denied.
i create a unix group called project1 and assign user1 user2 and user3
to this group.
now if i go back to the file and use the unix command: chgrp project1
it assigns the group project1 to the file. now anybody in project1 can
execute the file,
now user1 user2 and user3 can extecute this file. this is all ok in
unix. everything works as expected.
heres the problem.
in Java executing a runtime exec command , using the same file with the
project1 for the group,only user1 and user2 can execute. user3 gets
permission denied. i need to give world access for user3 to execute.
what i suspect is somehow Java honors the group permissions but doesn't
know about created unix groups, so it uses the login groups to
determine who is in a group.
can anybody verify this is true. (if it is it is a big security flaw.
people use unix groups to also deny access).
if not can anybody tell me what is going on?
thanks. i hope i explained this ok.
 
J

Joan

frank said:
i am going to explain this as best i can.
we are running on a UNIX system.
my question i think concerns the Java runtime exec. (or maybe
Java
itself).

INFO: In unix all users have a default login group. In unix you
can
create additional UNIX groups and assign users to these groups.
to help
explain the problem say we have 3 users.
user1 default login group is 1234
user2 default login group is 1234
user3 default login group is 1122
in unix if i set permissions on a file for group execute ,
anybody in
the same login group as me can execute this file.
so only user1 and user2 can execute. user3 permission denied.
i create a unix group called project1 and assign user1 user2
and user3
to this group.
now if i go back to the file and use the unix command: chgrp
project1
it assigns the group project1 to the file. now anybody in
project1 can
execute the file,
now user1 user2 and user3 can extecute this file. this is all
ok in
unix. everything works as expected.
heres the problem.
in Java executing a runtime exec command , using the same file
with the
project1 for the group,only user1 and user2 can execute. user3
gets
permission denied. i need to give world access for user3 to
execute.
what i suspect is somehow Java honors the group permissions but
doesn't
know about created unix groups, so it uses the login groups to
determine who is in a group.
can anybody verify this is true. (if it is it is a big security
flaw.
people use unix groups to also deny access).
if not can anybody tell me what is going on?
thanks. i hope i explained this ok.

Too many words you speak, but did you check out the permissions
on
the path?
 
M

Michael Rauscher

frank said:
i am going to explain this as best i can.
we are running on a UNIX system.
my question i think concerns the Java runtime exec. (or maybe Java
itself).

Perhaps it's bug 4052517...

Bye
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,177
Latest member
OrderGlucea
Top