Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.5k views
in .NET FTP by (160 points)
I'm using the following code to upload a file to a Unix server and works great. I been told that the file has not been sent with the following permission: CHMOD 666. Is it possible I send these permissions?

With ftp
.ServerAddress = CStr(moConfigData.Item("FTPServer"))
.ServerPort = CInt(moConfigData.Item("FTPPort"))
.UserName = CStr(moConfigData.Item("FTPUser"))
.Password = CStr(moConfigData.Item("FTPPassword"))
.TransferType = EnterpriseDT.Net.Ftp.FTPTransferType.ASCII
.EventsEnabled = True
.Connect()
.ChangeWorkingDirectory(CStr(moConfigData.Item("FTPWorkingFolder")))
.UploadFile(filename, ctime & fiPDF_File.Name)
.Close()
RaiseEvent DisplayMessage("FINISH: FTP process completed for file: " & ctime & fiPDF_File.Name)
End With

2 Answers

0 votes
by (162k points)
Use InvokeFTPCommand to send the chmod
0 votes
by (160 points)
I used the following and worked great:

ftp.InvokeSiteCommand("CHMOD", "666" & " " & fname)

Categories

...