Natizyskunk / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
385 stars 72 forks source link

Show .htaccess files on server #183

Open olivdee opened 2 years ago

olivdee commented 2 years ago

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?

mavuriel commented 2 years ago

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

olivdee commented 2 years ago

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...)

Natizyskunk commented 1 year ago

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.

olivdee commented 1 year ago

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?

godsdog commented 1 year ago

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

Natizyskunk commented 1 year ago

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

olivdee commented 1 year ago

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"

Natizyskunk commented 1 year ago

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,
olivdee commented 1 year ago

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

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

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

olivdee commented 1 year ago

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?

Natizyskunk commented 1 year ago

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.

olivdee commented 1 year ago

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

hollaweb commented 1 year ago

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

Natizyskunk commented 1 year ago

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

Natizyskunk commented 1 year ago

Related issues : #61, #121

olivdee commented 1 year ago

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?

NyaPPuu commented 1 year ago

@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

Natizyskunk commented 1 year ago

@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 ?

NyaPPuu commented 1 year ago

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

Natizyskunk commented 1 year ago

@NyaPPuu,

Oh ok I see. Perfect 🙂

olivdee commented 1 year ago

@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 commented 1 year ago

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: @.***>

janis-ps commented 1 year ago

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?

lucaele commented 1 year ago

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

Natizyskunk commented 1 year ago

@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.

rodgersl commented 1 year ago

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 😀

giuliopons commented 1 year ago

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

Nalik27 commented 1 year ago

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?

giuliopons commented 1 year ago

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.

Nalik27 commented 1 year ago

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.