<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>76442</bug_id>
          
          <creation_ts>2004-02-29 20:11:46 +0000</creation_ts>
          <short_desc>authentication failure on netware ftp server</short_desc>
          <delta_ts>2005-03-03 19:49:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kio</product>
          <component>ftp</component>
          <version>unspecified</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Michał Kosmulski">michal</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>211023</commentid>
    <comment_count>0</comment_count>
    <who name="Michał Kosmulski">michal</who>
    <bug_when>2004-02-29 20:11:46 +0000</bug_when>
    <thetext>Version:           3.2.0 (using KDE 3.2.0, compiled sources)
Compiler:          gcc version 3.3.2
OS:          Linux (i686) release 2.6.2

I&apos;m using kde 3.2 and yesterday I used konqueror to access a netware server via ftp (with authentication). It seems konqueror somehow interprets the file permissions on the server incorecctly. When I tried to click on any directory&apos;s icon to enter it, I was told I have no permissions to do it. I obviously have the permissions (eg. ncftp doesn&apos;t have any problems with accessing the same server) - and when I manually append the directory name to the address in the location bar, I am let in. Thus I can &quot;browse&quot; the directory tree by typing each name in the location bar, which isn&apos;t very convenient, but clicking on directory icons tells me I have no permissions. Obviously, I should be able to access the directories I have permissions for by clicking their icons.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>240377</commentid>
    <comment_count>1</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2004-06-10 15:50:43 +0000</bug_when>
    <thetext>Is this the same as http://bugs.kde.org/show_bug.cgi?id=36055?
How does the directory listing look like, when using the command-line &apos;ftp&apos; program?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>240581</commentid>
    <comment_count>2</comment_count>
    <who name="Michał Kosmulski">michal</who>
    <bug_when>2004-06-11 09:28:13 +0000</bug_when>
    <thetext>Yes, it seems to be the same thing as #36055.
Unfortunately, I don&apos;t have access to the ftp server where I first noticed the problem any more. The files that used to be there were moved to another machine which is also a netware server and is located in the same building so chances are it&apos;s configured in the same way. Unfortunately, access to the machine is restricted to several IP addresses only, and on the machines from which I can access the server, there is no konqueror. Below is a partial listing (from ncftp). All other files have exactly the same permissions.
- [RWCEAFMS] nzs_mkosmul         2105   Mar 19 18:55   debata.php
- [RWCEAFMS] nzs_mkosmul         1411   May  4 22:03   dnihiszp.php
- [RWCEAFMS] nzs_mkosmul         1253   Mar 19 18:55   dniotwarte.php
- [RWCEAFMS] nzs_mkosmul         2550   Mar 19 12:48   favicon.ico
- [RWCEAFMS] nzs_mkosmul          797   May 31 11:31   galeria.php
- [RWCEAFMS] nzs_mkosmul         1211   Mar 19 12:48   home.gif
- [RWCEAFMS] nzs_mkosmul         1408   Mar 19 12:48   icons.gif
- [RWCEAFMS] nzs_mkosmul         1266   Mar 19 12:48   identity.gif
d [RWCEAFMS] nzs_mkosmul          512   Mar 19 12:48   images</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>309410</commentid>
    <comment_count>3</comment_count>
    <who name="Tommi Tervo">tommi.tervo</who>
    <bug_when>2005-02-02 14:40:04 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 36055 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320683</commentid>
    <comment_count>4</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2005-03-03 19:37:34 +0000</bug_when>
    <thetext>Actually the netware listing is quite different from the d-------- listing from Microsoft, so those bugs are not duplicates.
I&apos;ll fix the netware listing parsing now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320689</commentid>
    <comment_count>5</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2005-03-03 19:49:51 +0000</bug_when>
    <thetext>CVS commit by faure: 

Fix parsing of Netware FTP servers, so that files don&apos;t all appear with a lock (no permissions).
BUG: 76442


  M +179 -172  ftp.cc   1.218


--- kdelibs/kioslave/ftp/ftp.cc  #1.217:1.218
@@ -1749,4 +1749,9 @@ bool Ftp::ftpReadDir(FtpEntry&amp; de)
     kdDebug(7102) &lt;&lt; &quot;dir &gt; &quot; &lt;&lt; buffer &lt;&lt; endl;
 
+    //Normally the listing looks like
+    // -rw-r--r--   1 dfaure   dfaure        102 Nov  9 12:30 log
+    // but on Netware servers like ftp://ci-1.ci.pwr.wroc.pl/ it looks like (#76442)
+    // d [RWCEAFMS] Admin                     512 Oct 13  2004 PSI
+
     // we should always get the following 5 fields ...
     const char *p_access, *p_junk, *p_owner, *p_group, *p_size;
@@ -1757,5 +1762,11 @@ bool Ftp::ftpReadDir(FtpEntry&amp; de)
     if( (p_size  = strtok(NULL,&quot; &quot;)) == 0) continue;
 
-    // try to parse it as a directory entry ...
+    //kdDebug(7102) &lt;&lt; &quot;p_access=&quot; &lt;&lt; p_access &lt;&lt; &quot; p_junk=&quot; &lt;&lt; p_junk &lt;&lt; &quot; p_owner=&quot; &lt;&lt; p_owner &lt;&lt; &quot; p_group=&quot; &lt;&lt; p_group &lt;&lt; &quot; p_size=&quot; &lt;&lt; p_size &lt;&lt; endl;
+
+    de.access = 0;
+    if ( strlen( p_access ) == 1 &amp;&amp; p_junk[0] == &apos;[&apos; ) { // Netware
+      de.access = S_IRWXU | S_IRWXG | S_IRWXO; // unknown -&gt; give all permissions
+    }
+
     const char *p_date_1, *p_date_2, *p_date_3, *p_name;
 
@@ -1772,5 +1783,6 @@ bool Ftp::ftpReadDir(FtpEntry&amp; de)
             // Check whether the size we just read was really the size
             // or a month (this happens when the server lists no group)
-            // Test on sunsite.uio.no, for instance
+    // Used to be the case on sunsite.uio.no, but not anymore
+    // This is needed for the Netware case, too.
             if ( !isdigit( *p_size ) )
             {
@@ -1786,10 +1798,9 @@ bool Ftp::ftpReadDir(FtpEntry&amp; de)
             }
 
-            if ( p_date_1 != 0 )
-              if ((p_date_2 = strtok(NULL,&quot; &quot;)) != 0)
-                if ((p_date_3 = strtok(NULL,&quot; &quot;)) != 0)
-                  if ((p_name = strtok(NULL,&quot;\r\n&quot;)) != 0)
+    if ( p_date_1 != 0 &amp;&amp;
+         (p_date_2 = strtok(NULL,&quot; &quot;)) != 0 &amp;&amp;
+         (p_date_3 = strtok(NULL,&quot; &quot;)) != 0 &amp;&amp;
+         (p_name = strtok(NULL,&quot;\r\n&quot;)) != 0 )
                   {
-
                     {
                        QCString tmp( p_name );
@@ -1817,5 +1828,4 @@ bool Ftp::ftpReadDir(FtpEntry&amp; de)
                     }
 
-                    de.access = 0;
                     de.type = S_IFREG;
                     switch ( p_access[0] ) {
@@ -1865,7 +1875,4 @@ bool Ftp::ftpReadDir(FtpEntry&amp; de)
                       de.access |= S_ISVTX;
 
-                    // maybe fromLocal8Bit would be better in some cases,
-                    // but what proves that the ftp server is in the same encoding
-                    // than the user ??
                     de.owner    = remoteEncoding()-&gt;decode(p_owner);
                     de.group    = remoteEncoding()-&gt;decode(p_group);
@@ -1930,5 +1937,5 @@ bool Ftp::ftpReadDir(FtpEntry&amp; de)
                     return true;
                   }
-  }
+  } // line invalid, loop to get another line
   return false;
 }


</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>