I am trying to change the permission of a file to 555 using the SFTPClient.chmod method and this seems to be corrupting the file permissions. For eg. the file permission before the execution of this method was "-rw-r--r--" and after the execution is "----r-x-wt". Is there some problem with the jar? Any help is appreciated.
PS: I have observed the same behaviour with sshj-0.30.0.jar as well.
import net.schmizz.sshj.SSHClient;
import net.schmizz.sshj.sftp.SFTPClient;
SSHClient ssh = <>; // get the SSHClient
SFTPClient sftp = ssh.newSFTPClient();
sftp.chmod(filename, 555);