vscode-sftp icon indicating copy to clipboard operation
vscode-sftp copied to clipboard

Show .htaccess files on server

Open olivdee opened this issue 2 years ago • 31 comments

Hi there, is there any chance we get the option to enable showing .htaccess files on the server? Maybe something one could add inside sftp.json, like so:

{
...
"showHiddenFiles": true
...
}

Thanks in advance!

Does this project help you?

  • [x] Yes. SFTP IS AWESOME!

olivdee avatar Aug 24 '22 12:08 olivdee

I don't know if that comes from server config, but I always see hidden files/folders in the sftp explorer and I can download it.🤔

image

mavuriel avatar Aug 29 '22 21:08 mavuriel

This is very strange, as I contacted the server support after your answer. They replied, that it cannot be a server issue, as: a) there is no such setting in server/apache config that blocks or allows "invisible"/".dot" files like .htaccess b) if this works with an FTP software (like FileZilla) then it should also work with another one as well (= YES it works with FileZilla on my side, I mean, FileZilla shows me the .htaccess file of the server/website whereas your SFTP extension does not show it on vscode...)

olivdee avatar Aug 30 '22 10:08 olivdee

Are you sure you d'ont have a parameter in your vscode user config that could interfere ? As @mavuriel stated, the extension always show hidden files (and dotfiles) by default and i haven't implemented any option to not show them.

Natizyskunk avatar Sep 12 '22 10:09 Natizyskunk

I am sure I never touched such a parameter, but cannot be sure if another extension did not mingle with it... Did a quick search through VSCode settings and could not find any related ones. Any idea where to specifically look for it?

olivdee avatar Sep 15 '22 14:09 olivdee

Same issue here. Filezilla is showing .dot files, no .dot files in the explorer remote view. The issue is only occuring on some servers?!

godsdog avatar Sep 23 '22 19:09 godsdog

On my end everything work fine. All dotfiles are showing correctly. Could you share your config please ?

Natizyskunk avatar Sep 27 '22 11:09 Natizyskunk

Sure. Which file is it? Inside C:\Users[USERNAME]\AppData\Roaming\Code\User\settings.json there isn't much info (see below). Any other config file you have in mind? "cSpell.enabled": false, "security.workspace.trust.untrustedFiles": "open", "sync.gist": "", "sync.autoDownload": true, "sync.autoUpload": true, "sync.forceUpload": true, "sync.forceDownload": true, "sync.quietSync": true, "window.commandCenter": true, "editor.wordWrap": "on"

olivdee avatar Sep 29 '22 08:09 olivdee

I was talinkg about the sftp.json config file in your .vscode folder inside your project.

In your user settings.json config file i can't see anything special. I suppose sync is another extension you're using. Please try adding those two parameters inside your user config file and try again to see what's logged in the sftp debug pannel.

"sftp.debug": true,
"sftp.printDebugLog": true,

Natizyskunk avatar Sep 29 '22 19:09 Natizyskunk

ah, I see... this is the sftp.json of the project:

{ 
"name": "xxx.xxxxx.xxx",  
"host": "xxx.xxxxx.xxx",  
"protocol": "ftp",  
"port": 0,  
"username": "[email protected]",  
"password": "xxxxxxxxx",  
"remotePath": "/new2022/htdocs",  
"uploadOnSave": false  
}

will add the two debug related ones and report back, thanks

olivdee avatar Sep 30 '22 18:09 olivdee

this is from the output tab right after inserting the two new lines: [09-30 20:39:07] [info] config at c:\git\neu.muenzankauf-muc.de {"remotePath":"/new2022/htdocs","uploadOnSave":false,"useTempFile":false,"openSsh":false,"downloadOnOpen":false,"ignore":[],"concurrency":4,"protocol":"ftp","connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"name":"xxx.xxxxx.xxx","host":"xxx.xxxxx.xxx","port":0,"username":"******","password":"******","sftp.debug":true,"sftp.printDebugLog":true} in the tab "debug console" it says "Please start a debug session to evaluate expressions" = do I need to do something here?

olivdee avatar Sep 30 '22 18:09 olivdee

everything seems fine to me. This is inconsistent as some poeple are having the same problem but others don't have it and it doesn't seems to come from a specific configuration. I'll keep an eye on this and keep you updated.

Natizyskunk avatar Oct 01 '22 01:10 Natizyskunk

do you think it makes any sense if I install a clean VS Code on the same machine with another user?

olivdee avatar Oct 01 '22 17:10 olivdee

i had the same problem, i changed the proftpd server config with ListOptions "-l" => ListOptions "-a", and the problem was solved, hope this help

hollaweb avatar Oct 03 '22 13:10 hollaweb

For those using proftpd, please check this section of the FAQ.

Natizyskunk avatar Oct 04 '22 13:10 Natizyskunk

Related issues : #61, #121

Natizyskunk avatar Oct 04 '22 13:10 Natizyskunk

there is no proftpd on the server as far as I can see - it is running CentOS Linux 7.9.2009 with Plesk Obsidian Version 18.0.47 Update #2 ... as I mentioned, using filezilla shows .htaccess files - do you think it is worth installing a clean vs code with your sftp extension on another user account on the same PC, or even on a total different PC and check again?

olivdee avatar Oct 06 '22 15:10 olivdee

@olivdee @godsdog image Is this option checked in FileZilla?

I succeeded in reproducing the error. FileZilla: image vscode-sftp: image If you check the options mentioned above, you can see hidden files in Filezilla, but not in sftp. You can add a line from vsftp.conf to make hidden files visible to all clients. force_dot_files=YES

NyaPPuu avatar Oct 07 '22 00:10 NyaPPuu

@NyaPPuu,

You can add a line from vsftp.conf to make hidden files visible to all clients.

Do you mean sftp.json ?

Also where does this force_dot_files=YES option come from ?

Natizyskunk avatar Oct 07 '22 01:10 Natizyskunk

@Natizyskunk from server In my case file is in /etc/vsftpd.conf

NyaPPuu avatar Oct 07 '22 01:10 NyaPPuu

@NyaPPuu,

Oh ok I see. Perfect 🙂

Natizyskunk avatar Oct 07 '22 01:10 Natizyskunk

@NyaPPuu no, "Force show hidden files" is not checked with my FileZilla, but .htaccess are showing there! Checked on 2 different online servers with different setup/OS...

since there is no /etc/vsftpd.conf, what should/could I do?

olivdee avatar Oct 07 '22 06:10 olivdee

what is proftpd and where is the config? not using such an extension...On Oct 3, 2022 15:51, kvd999 @.***> wrote: i had the same problem, i changed the proftpd server config with ListOptions "-l" => ListOptions "-a", and the problem was solved, hope this help

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

olivdee avatar Oct 11 '22 07:10 olivdee

I discovered that the -la switch to FTP list command was removed here due to partial support: https://github.com/liximomo/vscode-sftp/commit/c2608f7573e8169fae1e72b6e254ea7ee292dfa3

Maybe it could be re-added as an option?

janis-ps avatar Nov 03 '22 09:11 janis-ps

I'm using SFTP ver 1.16.1

If "protocol" is set to "ftp" hidden files are not shown If "protocol" is set to "sftp" hidden files are shown

lucaele avatar Nov 11 '22 15:11 lucaele

@lucaele, Yes that's because when you're using the sftp protocol, we set the parameter showHiddenFiles to TRUE in the list() command but when using the ftp protocol, we set the parameter showHiddenFiles to FALSE in the list() command that has the effect to remove the -al options from the ftp LIST command.

@janis-ps, Thanks, I will take a look at it more in depth.

Natizyskunk avatar Nov 12 '22 02:11 Natizyskunk

hey @Natizyskunk just wanted to check if you had made any progress on this issue?

I have a similar issue with a CentOS Plesk server, connecting with this extension I can't see hidden / dot files but if I connect with another FTP client I can see them no problem.

Thanks for your work on this extension, it's really appreciated 😀

rodgersl avatar Nov 23 '22 22:11 rodgersl

Hi, same problem. Can I have protocol set to ftp and manually force the showHiddenFiles to true in sftp.json?

giuliopons avatar Jan 26 '23 20:01 giuliopons

Also faced this problem. When I use the SFTP protocol, then I see the .htaccess file When I use the FTP protocol, I don't see the .htaccess file

Can you please tell me how to enable .htaccess display? Can this be done in the sftp.json settings?

Nalik27 avatar Jan 30 '23 21:01 Nalik27

Also faced this problem. When I use the SFTP protocol, then I see the .htaccess file When I use the FTP protocol, I don't see the .htaccess file

Can you please tell me how to enable .htaccess display? Can this be done in the sftp.json settings?

I've asked my provider to switch to sftp, and solved the problem.

giuliopons avatar Jan 30 '23 22:01 giuliopons

Also faced this problem. When I use the SFTP protocol, then I see the .htaccess file When I use the FTP protocol, I don't see the .htaccess file Can you please tell me how to enable .htaccess display? Can this be done in the sftp.json settings?

I've asked my provider to switch to sftp, and solved the problem.

Thanks for your willingness to help! My hoster says there is no way to provide me with SFTP. Because FTP is my only option.

Nalik27 avatar Jan 30 '23 22:01 Nalik27