FTP - Show hidden files

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

User avatar
Viikate
Junior Member
Junior Member
Posts: 2
Joined: 2010-04-23, 19:25 UTC
Location: Czech Republic

FTP - Show hidden files

Post by *Viikate »

Hello!
"FTP - Show hidden files" doesn't work (TC 7.55 public beta 1-3).
At least .htaccess file is still hidden.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

You're right that it doesn't seem to be working right but my .htaccess file shows fine whether I have "Show Hidden Files" on or off.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

When checking/unchecking the option, TC correctly switches between "LIST -la"/"LIST", at least it says so in the log. On some servers it works and dot files are shown/hidden. Others show them no matter what. I compared it with 7.50a and it's exactly the same.
I think it might depend on specific server, what it considers "hidden" files and if it even understands "-la" option.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

2Sob,

The maybe it has been broken for a few versions. I have always had it enabled so I have not tested it on any other versions.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

AFAIK the parameters for LIST command like "-la" are non-standard thing coming from old Unix world, where FTP servers used to call system "ls" command and returned it's output. And "ls" doesn't show hidden files by default, so they needed additional parameters. I didn't find any mention of these parameters in RFC. So some servers may not care about them at all.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Does the server support MLSD? There is no -la parameter for MLSD, so the switch does nothing. It depends on the server wether MLSD lists all files or not.
Author of Total Commander
https://www.ghisler.com
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

I just tried WinSCP and it will show the hidden files if I select it to and not show them if I don't. So, it works with my server properly for the hidden files, if that helps at all.

According to my ftp log file, the server shows MLSD. It should work in TC if it works right in WinSCP, shouldn't it?
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, RFC 3659 says something else:
http://tools.ietf.org/html/rfc3659
7.1. Format of MLSx Requests

The MLST and MLSD commands each allow a single optional argument.
This argument may be either a directory name or, for MLST only, a
file name. For these purposes, a "file name" is the name of any
entity in the server NVFS which is not a directory. Where TVFS is
supported, any TVFS relative pathname valid in the current working
directory, or any TVFS fully qualified pathname, may be given. If a
directory name is given then MLSD must return a listing of the
contents of the named directory, otherwise it issues a 501 reply, and
does not open a data connection.
Author of Total Commander
https://www.ghisler.com
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

Sorry to sound dense here, but I'm not sure what that means. Is it a problem with TC or not then?
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

It means that the only allowed parameter is file/directory name => no other switch for hidden files.

And are you sure that WinSCP uses MLSD? Mine sends LIST even when server announces MLSD support. And string "MLSD" is nowhere to be found in WinSCP source code.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

2Sob,

I was referring to TC using MSLD. I'm not sure what WinSCP uses. Does this line mean anything (in WinSCP)?

LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No

All I know is if I do a CTL+ALT+H, it switches between showing hidden files and not showing hidden files.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

You mentioned WinSCP and how it works right there. :) And I'm sure that if you force TC to not use MLSD (and use the old LIST), hiding/showing of hidden files will work just like in WinSCP.
But MLSD is completely different command. It has no options to show or not to show hidden files. It should show all of them all the time.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

I think TC should use whatever works, just like in WinSCP and other FTP programs. Otherwise the "show hidden files" options is moot.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

It would be best to remove the whole hidden files concept from FTP altogether, because it's horribly wrong from the beginning. Hidden files is strictly user stuff. Programs like TC should know about all existing files all the time. But currently if you turn off display of hidden files, even TC does not have any info about them. So if you decide to upload some file that already exists on the server as hidden, you don't get any overwrite confirmation, because TC has no idea that the file is already there. If there is to be any hiding of files, it should be done on client side only.

And MLSD is way better, when compared with old LIST. Output of LIST is not clearly defined. There are several different formats. Some are missing important information, e.g. traditional Unix format may not include file time, just date. Also dates are usually in local time and client has no idea what timezone server uses, so it creates problems with advanced stuff like synchronization. MLSD guarantees the same predictable output format on every server, so it's the right choice.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

I agree mostly with what you said. But I think the hidden files feature is important and should be there. If nothing else, to guard against accidents. It works fine in every FTP program I have tried, except TC.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
Post Reply