Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java not recognizing UNIX secondary group

 
Paul Binni
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Paul
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Raghavan

Yes its on Solaris OS. What was you solution for your issue?
 
Venkateswarlu Sangam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Thanks
 
Venkateswarlu Sangam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic