Index: src/interface/xmlfunctions.cpp
===================================================================
--- src/interface/xmlfunctions.cpp	(revision 5003)
+++ src/interface/xmlfunctions.cpp	(working copy)
@@ -653,6 +653,7 @@
 	}
 
 	server.SetBypassProxy(GetTextElementInt(node, "BypassProxy", false) == 1);
+	server.SetProtLevel(GetTextElement_Trimmed(node, "ProtLevel"));
 	server.SetName(GetTextElement_Trimmed(node, "Name"));
 
 	if (server.GetName().empty())
@@ -738,6 +739,8 @@
 	}
 
 	AddTextElementRaw(node, "BypassProxy", server.GetBypassProxy() ? "1" : "0");
+	AddTextElement(node, "ProtLevel", server.GetProtLevel());
+
 	const wxString& name = server.GetName();
 	if (name != _T(""))
 		AddTextElement(node, "Name", name);
Index: src/include/server.h
===================================================================
--- src/include/server.h	(revision 5003)
+++ src/include/server.h	(working copy)
@@ -84,6 +84,7 @@
 	enum PasvMode GetPasvMode() const;
 	int MaximumMultipleConnections() const;
 	bool GetBypassProxy() const;
+	wxString GetProtLevel() const;
 
 	// Return true if URL could be parsed correctly, false otherwise.
 	// If parsing fails, pError is filled with the reason and the CServer instance may be left an undefined state.
@@ -97,6 +98,8 @@
 	bool SetUser(const wxString& user, const wxString& pass = _T(""));
 	bool SetAccount(const wxString& account);
 
+	bool SetProtLevel(const wxString &level);
+
 	CServer& operator=(const CServer &op);
 	bool operator==(const CServer &op) const;
 	bool operator<(const CServer &op) const;
@@ -164,6 +167,8 @@
 
 	std::vector<wxString> m_postLoginCommands;
 	bool m_bypassProxy;
+
+	wxString m_protLevel;
 };
 
 #endif
Index: src/engine/server.cpp
===================================================================
--- src/engine/server.cpp	(revision 5003)
+++ src/engine/server.cpp	(working copy)
@@ -312,6 +312,7 @@
 	m_postLoginCommands = op.m_postLoginCommands;
 	m_bypassProxy = op.m_bypassProxy;
 	m_name = op.m_name;
+	m_protLevel = op.m_protLevel;
 
 	return *this;
 }
@@ -361,6 +362,8 @@
 		return false;
 	if (m_bypassProxy != op.m_bypassProxy)
 		return false;
+	if (m_protLevel != op.m_protLevel)
+		return false;
 
 	// Do not compare number of allowed multiple connections
 
@@ -453,6 +456,11 @@
 	else if (m_bypassProxy > op.m_bypassProxy)
 		return false;
 
+	if (m_protLevel < op.m_protLevel)
+		return true;
+	else if (m_protLevel > op.m_protLevel)
+		return false;
+
 	// Do not compare number of allowed multiple connections
 
 	return false;
@@ -500,6 +508,8 @@
 		return false;
 	if (m_bypassProxy != op.m_bypassProxy)
 		return false;
+	if (m_protLevel != op.m_protLevel)
+		return false;
 
 	// Do not compare number of allowed multiple connections
 
@@ -686,6 +696,7 @@
 	m_encodingType = ENCODING_AUTO;
 	m_customEncoding = _T("");
 	m_bypassProxy = false;
+	m_protLevel = _T("P");
 }
 
 bool CServer::SetEncodingType(enum CharsetEncoding type, const wxString& encoding /*=_T("")*/)
@@ -823,6 +834,20 @@
   return m_bypassProxy;
 }
 
+wxString CServer::GetProtLevel() const
+{
+	return m_protLevel;
+}
+
+bool CServer::SetProtLevel(const wxString &level)
+{
+	if (level != _T("P") && level != _T("C"))
+	  return false;
+
+	m_protLevel = level;
+	return true;
+}
+
 bool CServer::ProtocolHasDataTypeConcept(const enum ServerProtocol protocol)
 {
 	if (protocol == FTP || protocol == FTPS || protocol == FTPES)
@@ -881,3 +906,5 @@
 		return _("Anonymous");
 	}
 }
+
+
Index: src/engine/ftpcontrolsocket.cpp
===================================================================
--- src/engine/ftpcontrolsocket.cpp	(revision 5003)
+++ src/engine/ftpcontrolsocket.cpp	(working copy)
@@ -925,7 +925,7 @@
 	else if (pData->opState == LOGON_PROT)
 	{
 		if (code == 2 || code == 3)
-			m_protectDataChannel = true;
+			m_protectDataChannel = m_pCurrentServer->GetProtLevel() != _T("C");
 	}
 	else if (pData->opState == LOGON_CUSTOMCOMMANDS)
 	{
@@ -1191,7 +1191,7 @@
 		res = Send(_T("PBSZ 0"));
 		break;
 	case LOGON_PROT:
-		res = Send(_T("PROT P"));
+		res = Send(_T("PROT ") + m_pCurrentServer->GetProtLevel());
 		break;
 	case LOGON_CUSTOMCOMMANDS:
 		if (pData->customCommandIndex >= m_pCurrentServer->GetPostLoginCommands().size())
