lib/src/main/java/edu/utexas/tacc/tapis/files/lib/clients/SSHDataClient.java
@Override
    public NativeLinuxOpResult linuxChmod(@NotNull String remotePath, @NotNull String permsStr, boolean recursive)
        throws TapisException, IOException, NotFoundException {
        String opName = "chmod";

        // Parse and validate the chmod perms argument
        try {
            int permsInt = Integer.parseInt(permsStr, 8);
            // Check that value is in allowed range
            if (permsInt > MAX_PERMS_INT || permsInt < 0) {
                String msg = Utils.getMsg("FILES_CLIENT_SSH_CHMOD_PERMS", oboTenant, oboUser, systemId, username, host,
                    remotePath, permsStr);
                throw new TapisException(msg);
            }
        } catch (NumberFormatException e) {
            String msg = Utils.getMsg("FILES_CLIENT_SSH_CHMOD_ERR", oboTenant, oboUser, systemId, username, host,
                remotePath, permsStr, e.getMessage());
            throw new TapisException(msg, e);
        }

        // Run the command
        return runLinuxChangeOp(opName, permsStr, remotePath, recursive);
    }
/**
     * Run the linux chmod operation
     * Perms argument is validated to be an octal number between 000 and 777
     *
     * @param remotePath - target of operation
     * @param permsStr   - perms as octal (000 through 777)
     * @param recursive  - add -R for recursive
     */
Run the linux chmod operation
Perms argument is validated to be an octal number between 000 and 777

@param remotePath - target of operation
@param permsStr   - perms as octal (000 through 777)
@param recursive  - add -R for recursive
Run the linux chmod operation Perms argument is validated to be an octal number between 000 and 777 @param remotePath - target of operation @param permsStr - perms as octal ( 000 through 777 ) @param recursive - add - R for recursive
@Override
    public NativeLinuxOpResult linuxChmod(@NotNull String remotePath, @NotNull String permsStr, boolean recursive)
        throws TapisException, IOException, NotFoundException {
        String opName = "chmod";
        try {
            int permsInt = Integer.parseInt(permsStr, 8);
            if (permsInt > MAX_PERMS_INT || permsInt < 0) {
                String msg = Utils.getMsg("FILES_CLIENT_SSH_CHMOD_PERMS", oboTenant, oboUser, systemId, username, host,
                    remotePath, permsStr);
                throw new TapisException(msg);
            }
        } catch (NumberFormatException e) {
            String msg = Utils.getMsg("FILES_CLIENT_SSH_CHMOD_ERR", oboTenant, oboUser, systemId, username, host,
                remotePath, permsStr, e.getMessage());
            throw new TapisException(msg, e);
        }
        return runLinuxChangeOp(opName, permsStr, remotePath, recursive);
    }
@ Override public NativeLinuxOpResult linuxChmod ( @ NotNull String remotePath , @ NotNull String permsStr , boolean recursive ) throws TapisException , IOException , NotFoundException { String opName = "chmod" ; try { int permsInt = Integer . parseInt ( permsStr , 8 ) ; if ( permsInt > MAX_PERMS_INT || permsInt < 0 ) { String msg = Utils . getMsg ( "FILES_CLIENT_SSH_CHMOD_PERMS" , oboTenant , oboUser , systemId , username , host , remotePath , permsStr ) ; throw new TapisException ( msg ) ; } } catch ( NumberFormatException e ) { String msg = Utils . getMsg ( "FILES_CLIENT_SSH_CHMOD_ERR" , oboTenant , oboUser , systemId , username , host , remotePath , permsStr , e . getMessage ( ) ) ; throw new TapisException ( msg , e ) ; } return runLinuxChangeOp ( opName , permsStr , remotePath , recursive ) ; }
Run the linux chmod operation
 Perms argument is validated to be an octal number between 000 and 777
Run the linux chmod operation Perms argument is validated to be an octal number between 000 and 777
// Parse and validate the chmod perms argument // Check that value is in allowed range // Run the command