GeeCON Prague 2014*
The moose likes I/O and Streams and the fly likes Java not recognizing UNIX secondary group Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Java not recognizing UNIX secondary group" Watch "Java not recognizing UNIX secondary group" New topic
Author

Java not recognizing UNIX secondary group

Paul Binni
Greenhorn

Joined: Nov 10, 2009
Posts: 2
I'm seeing the following problem and I think it is related to java bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4052517

I have a directory called test. the ownership of that directory belongs to the 'aa' group.
I have a user junioradm whose primary group is 'adm' but is also a member of the 'aa' group.

I'm executing a java program as the junioradm user. The program is supposed to create directories in the test directory.
When I run the program mkdir() is returning false. If I change the group owner of the test directory to 'adm' the program executes fine.

The problem seems to be that java does not recognise that ‘junioradm’ is a member of the ‘aa’ group and will not create the directories because of this.

Has anyone seen this problem before or encountered bug 4052517? Is there any known solution?
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Welcome to JavaRanch, Paul


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Looks like it occurs on Solarix OS. Are you using the same? I did come across a similar issue but the not the same!
Paul Binni
Greenhorn

Joined: Nov 10, 2009
Posts: 2
Thanks Raghavan

Yes its on Solaris OS. What was you solution for your issue?
Venkateswarlu Sangam
Greenhorn

Joined: Nov 28, 2004
Posts: 3
Hi,

me too facing same problem in solaris server ...any solution available ?

Thanks
Venkateswarlu Sangam
Greenhorn

Joined: Nov 28, 2004
Posts: 3
Hi,

Resolved the issue using /bin/sh -c mkdir /dirpath

see below information

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4052517

I did the /bin/sh workaround (I needed to do /bin/sh -c). It's
pretty amazing this bug has been around so long.


Thanks,
 
GeeCON Prague 2014
 
subject: Java not recognizing UNIX secondary group