Reputation: 190
How do I change the permissions of a file using TidFTP in Delphi?
with IdFTP1 do
begin
try
Connect;
ChangeDir(FTPDiretorio);
Put(FArquivo, NomeOnline);
chmod(' ');//640 HOW??????????????
Disconnect;
finally
FreeAndNil(IdFTP1);
end;
end;
Upvotes: 3
Views: 1316
Reputation: 595497
CHMOD
is not a standard FTP command. Some FTP servers implement it as a custom command, and others do not implement it at all. As such, you have to use the TIdFTP.Site()
method to send it, on FTP servers you know support it, eg:
IdFTP.Site('CHMOD 640 filename');
Upvotes: 5