Bonjour,
En utilisant l'API d'Apache commons-net pour mon transfert ftp , je desire faire un chmod sur le fichier en remote :
Je m'explique :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FTPClient clientFtp = new FTPClient();
...//connect() + login()
try {

String fileName = "monfichier.sh" ;
String remoteFilesDirectoryPath = "exec";
FileInputStream stream = new FileInputStream(fileName );
...
	String fileDirectory = (remoteFilesDirectoryPath != null) ? remoteFilesDirectoryPath + SEPARATOR : "";
	boolean isStored = clientFtp.storeFile(fileDirectory + fileName, stream);
	if (!isStored) {
		log.error("Error occured on " + fileName + " transfert ");
	} else {
		//rendre le fichier executable 
		log.debug("- " + fileName + " : transfert complete");
	}
} catch (IOException e) {
	log.error("fail to transfert " + fileName);
	e.printStackTrace();
}
Ma question est simple : comment faire cela ?