Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).
no avatar
User

f.pici@memar.it

Posts

1

Joined

Fri Nov 25, 2011 11:37 pm

File uploading to Proftpd error

by f.pici@memar.it » Fri Nov 25, 2011 11:54 pm

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");
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: File uploading to Proftpd error

by support2 » Sat Nov 26, 2011 7:47 am

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.

Who is online

Users browsing this forum: No registered users and 18 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron