Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.2k views
in .NET FTP by (120 points)
Hello,
i have a strange problem trying to upload a file to my proftpd server using edtNetPro version 7.4.0.

The problem is that my SecureFTPConnection inside my c# code tryes to send a chmod on upload start. i can see that from server log:

nov 25 14:06:44 mod_sftp/0.9.7[28815]: user 'test' authenticated via 'password' method
nov 25 14:06:44 mod_sftp/0.9.7[28815]: 'subsystem' channel request for 'sftp' subsystem
nov 25 14:06:44 mod_sftp/0.9.7[28815]: using SFTP protocol version 3 for this session (channel ID 0)
nov 25 14:06:44 mod_sftp/0.9.7[28815]: chmod of '/attivo/.in.634578268244163574.zip.' blocked by <Limit> configuration
nov 25 14:06:44 mod_sftp/0.9.7[28815]: error changing permissions of '/attivo/.in.634578268244163574.zip.' to 0755: Permission denied
nov 25 14:06:44 mod_sftp/0.9.7[28815]: OPEN command for '/attivo/634578268244163574.zip' blocked by 'STOR' handler

my proftpd.conf has been configured to prevent chmod:

<Limit SITE_CHMOD>
DenyAll
</Limit>

If i use filezilla to upload the same file in the same folder i have no problem (so i think it is not a problem o ftp server).

The only way to make it work is to comment out previous proftpd configuration tag, so every client can do chmod on uploaded files. But i do not want to be such permissive.

Is there a way to prevent edtFTPNet/PRO to do a chmod on upload?

Tat's the code i used:

SecureFTPConnection sftp = new SecureFTPConnection();
sftp.ProxySettings = new EnterpriseDT.Net.Proxy.ProxySettings();
sftp.ProxySettings.ProxyType = EnterpriseDT.Net.Proxy.ProxyType.NoProxy;
sftp.Protocol = FileTransferProtocol.SFTP;
sftp.ServerAddress = "<my server address>";
sftp.UserName = "test";
sftp.Password = "test";
sftp.ServerCompatibility = SecureFTPCompatibilityFlags.SSHDisableChmodAfterPut;
sftp.Connect();
sftp.ConnectMode = FTPConnectMode.PASV;
sftp.TransferType = FTPTransferType.BINARY;
sftp.ChangeWorkingDirectory("dest_folder");
sftp.UploadFile("C:\\source.txt", "dest.txt");

1 Answer

0 votes
by (162k points)
Enable logging at the All level and email the zipped file to support.

chmod is only called *after* upload in our code, and the flag you have set should prevent that.

We'll take a look to see if we can see what is going on.

Categories

...