code: public static boolean chmod(String as, File f, Set<ChmodBit> set, Set<ChmodBit> clear)
  	{
  		if (!f.exists())
  		{
  			log.error("[FileHelper] {chmod} Non-existant file: " + f.getPath());
  			return false;
  		}
  
  		String permissions = ChmodBit.toString(set, clear);
  
  		try
  		{
  			Execed call = Exec.utilityAs(as, "chmod", permissions, f.getPath());
  
  			int returnCode = call.waitForExit();
  
  			return returnCode == 0;
  		}
  		catch (Exception e)
  		{
  			log.error("[LockRecord] {chmod} Failure: " + e.getMessage(), e);
  			return false;
  		}
  	}
docs: Performs a chmod (which assumes this system is Linux/UNIX/Solaris/etc), altering the permissions using symbols (ie. chmod
  o+w)
  
  @param f
  @param set
  The permissions to set on the file
  @param clear
  The permissions to modify on the file
  
  @return
  
  @throws IOException