add x permission in LISTFileFormater
------------------------------------

                 Key: FTPSERVER-221
                 URL: https://issues.apache.org/jira/browse/FTPSERVER-221
             Project: FtpServer
          Issue Type: Improvement
          Components: Core
    Affects Versions: 1.0-M3
         Environment: Mac OS X
            Reporter: Johannes Katelaan
            Priority: Minor
             Fix For: 1.0-M3


I think, the LISTFileFormater should be changed to produce x-Permission for 
directories. Some graphical FTP clients show strange behavior if this is 
missing.
Eg. on Mac OS X if you use Cyberduck, then a small "no entry" traffic sign will 
be attached to the directory icons, although it will allow you to enter the 
directories.
The following patch would help:

Index: 
core/src/main/java/org/apache/ftpserver/command/impl/listing/LISTFileFormater.java
===================================================================
--- 
core/src/main/java/org/apache/ftpserver/command/impl/listing/LISTFileFormater.java
  (revision 713977)
+++ 
core/src/main/java/org/apache/ftpserver/command/impl/listing/LISTFileFormater.java
  (working copy)
@@ -95,6 +95,7 @@
         permission[0] = file.isDirectory() ? 'd' : '-';
         permission[1] = file.isReadable() ? 'r' : '-';
         permission[2] = file.isWritable() ? 'w' : '-';
+        permission[3] = file.isDirectory() ? 'x' : '-';
         return permission;
     }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to