Pergunta

I need to handle remote file on a ftp server via commons-net-1.4.1.jar,class org.apache.commons.net.ftp.FTPClient.It's seems that no api available to change a file's permission,just like unix shell command chmod.

Anyone know any solution to resolve this issue?

Foi útil?

Solução

FTP doesn't have a command for such operations, since the operation is platform-specific. If your library supports this, you can try using SITE command and pass the command line as a parameter of SITE command. Some servers support this trick to run shell commands.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top