Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top