I am trying to set read/write/executable permissions to an EXISTING directory in Java on UNIX platform. The code I have -
File dir = new File(path);
boolean rc1 = dir.setExecutable(true, false);
boolean rc2 = dir.setReadable(true, false);
boolean rc3 = dir.setWritable(true, false);
All three booleans rc1,rc2,rc3 are evaluated to false. How do I fix this?
All three booleans should evaluate to TRUE.