public static boolean chmod(String as, File f, File copyOf)
	{
		if (!f.exists())
		{
			log.error("[FileHelper] {chmod} Non-existant file: " + f.getPath());
			return false;
		}

		if (!copyOf.exists())
		{
			log.error("[FileHelper] {chmod} Non-existant file: " + copyOf.getPath());
			return false;
		}

		try
		{
			Execed call = Exec.utilityAs(as, "chmod", "--reference=" + copyOf.getPath(), f.getPath());

			int returnCode = call.waitForExit();

			return returnCode == 0;
		}
		catch (Exception e)
		{
			log.error("[LockRecord] {chmod} Failure: " + e.getMessage(), e);
			return false;
		}
	}
public static boolean chmod ( String as , File f , File copyOf ) { if ( ! f . exists ( ) ) { log . error ( "[FileHelper] {chmod} Non-existant file: " + f . getPath ( ) ) ; return false ; } if ( ! copyOf . exists ( ) ) { log . error ( "[FileHelper] {chmod} Non-existant file: " + copyOf . getPath ( ) ) ; return false ; } try { Execed call = Exec . utilityAs ( as , "chmod" , "--reference=" + copyOf . getPath ( ) , f . getPath ( ) ) ; int returnCode = call . waitForExit ( ) ; return returnCode == 0 ; } catch ( Exception e ) { log . error ( "[LockRecord] {chmod} Failure: " + e . getMessage ( ) , e ) ; return false ; } }
Performs a chmod (which assumes this system is Linux/UNIX/Solaris/etc), replacing the permissions on <code>f</code> with
the permissions on <code>copyOf</code>

@param f
@param copyOf
the file to use the permissions from

@return

@throws IOException