ronnih
Posts: 32
Joined: Wed Nov 29, 2017 8:59 am
Location: Matrix Network
Contact: Website

After edit file over ssh the file is empty. All data lost :(

Sun Mar 03, 2019 7:00 pm

Hello,

had today discover some terrible.

On my Raspberry X i open my file manager PCManFM 1.2.5 and made a ssh-connection to my Raspberry Y with sftp://ronni@stretch_fhem/home/ronni

Now i open a text-file on my Raspberry Y with Leafpad edit some lines and save the file, close Leafpad and close PCManFM and thus the SSH connection to Y.

After hours of amazement and troubleshooting, I found that the text file I had previously edited was empty :o
I was able to reproduce this phenomenon with other text files as well.

My Question is: How can I edit files in Raspbian graphically via SSH? Without installing additional software.

Thx and Regards
Ronni
https://techguru.lima-city.de

User avatar
B.Goode
Posts: 10725
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: After edit file over ssh the file is empty. All data lost :(

Sun Mar 03, 2019 7:06 pm

The situation you describe is consistent with a microSD card that has spontaneously (and probably irrevocably) entered a Read Only state.

If this is the case it will be unrelated to the fact that you are making a remote access connection to edit the file.

Do you have a direct keyboard/monitor connection to your RPi: can you reproduce the symptoms in that scenario?

ronnih
Posts: 32
Joined: Wed Nov 29, 2017 8:59 am
Location: Matrix Network
Contact: Website

Re: After edit file over ssh the file is empty. All data lost :(

Sun Mar 03, 2019 7:39 pm

Hello B.Goode,

the SD Cards on my Raspberrys are all good and had no problems. If I make a SSH Connection over LXTerminal I can edit every file and save the changes with no Problem. Only If I edit the files with SSH Connection over FileManger(PCmanFM and Leafpad) the file has 0 Byte after edit.
https://techguru.lima-city.de

Return to “Raspberry Pi OS”