LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Edit text remote file via WEB (https://www.linuxquestions.org/questions/linux-newbie-8/edit-text-remote-file-via-web-4175682327/)

mackowiakp 09-18-2020 01:53 AM

Edit text remote file via WEB
 
I am looking for most simple/lightweight WEB based tool for edit (without necessity to install whole WEB tools) text file (UTF-8 encoded) on remote Linux based node. It could be something like https://github.com/kalcaddle/KodExplorer but much less complicated that is less code because limited resources on target device. It needs to be installed on small home automation device (ARM7, single core), based on Debian/Ubuntu. I meat long time ego such tool but I dont remember the name. Maybe somebody use such app?

scasey 09-18-2020 02:12 AM

Webmin?

Turbocapitalist 09-18-2020 02:31 AM

Or a web-based SSH client runnig nano on the remote system. There are a few options but many require some setup on the remote machine first.

pan64 09-18-2020 02:41 AM

if I remember well even midnight commander was able to edit a file on a remote host, but obviously it should be configured (to be able to do that).

mackowiakp 09-18-2020 05:45 AM

Of course. vi/nano over ssh, midnight commander over ssh (WORS!) etc. But I am looking for solution dedicated for "non-computer" people. Lets say "housewife proof".

Turbocapitalist 09-18-2020 05:50 AM

Have you tried LibreOffice's option to open and edit a remote file? It should be there somewhere in the File menu? The only trick with that approach would be ensuring that the file gets saved as text and not ODF or one of the many DOCX variants.

mackowiakp 09-18-2020 09:38 AM

Yes, its possible and easy to implement. But what if the file should be edited from tablet or phone?

pan64 09-18-2020 10:41 AM

Quote:

Originally Posted by mackowiakp (Post 6167470)
Yes, its possible and easy to implement. But what if the file should be edited from tablet or phone?

I would say you need to upload/download files and edit locally.

TB0ne 09-18-2020 11:53 AM

Quote:

Originally Posted by mackowiakp (Post 6167470)
Yes, its possible and easy to implement. But what if the file should be edited from tablet or phone?

I'd strongly recommend you NEVER allow this for anything that matters. You're talking about giving read/write to (essentially) anyone who can access that web page. From a security standpoint, that is horrible.

Please think carefully about what you're doing and evaluate the reasons why you want to do it. Downloading and re-uploading (as pan64 recommended), is FAR better.

sevendogsbsd 09-18-2020 12:47 PM

What TB0ne and pan64 said: this is for convenience and if you can conveniently edit a text file on your system from the Internet, so can a bad actor. At minimum, it opens a door into your network that does not need to be opened. Maybe put the file in a cloud service and edit from there or as suggested, download and edit then upload.

boughtonp 09-18-2020 04:47 PM


 
mackowiakp, please clarify exactly what it is you are wanting to do, including who would be editing what and why?

If you have a home network with a local server and suitable authentication in place there is nothing wrong with allowing remote editing of files by other machines in that network.

Even allowing access via the Internet, again with appropriate security precautions in place, is not a problem.

I don't understand the download/modify/upload posts - any such system needs security too - and is not a magic bullet, but certainly would be a pain in the arse for the users, making them less likely to want to bother with editing the files.


mackowiakp 09-21-2020 01:14 PM

So in short words. I made - by adding some software I wrote - from a Linux-based satellite receiver, a radio receiver streaming Internet radios. It works independently of the Sat function.
The software contains a text file with lines containing the name of the internet station and the URL to it. And it is this file (for example) I would like to be easy to edit. Such editing would not allow access to any file other than those indicated.
And once I saw an application that allowed my dad to edit via WEB. It had the form as below.

Code:

name_of_application file1 file2 file3 # set of files for editing
In the displayed WEB page, a column with files to be edited was displayed on the left side, and the screen rest was occupied by the file you clicked on in the list in the right column.
It was definitely a project from GitHub. But I don't remember his name. Hence my question.

Turbocapitalist 09-21-2020 01:24 PM

Quote:

Originally Posted by mackowiakp (Post 6168320)
It was definitely a project from GitHub. But I don't remember his name. Hence my question.

That will require a lot of detective work. There are very, very many projects there in various stages of completion there and not a proper index or catalog.

If he will be sitting at a GNU/Linux machine, it would be easy to make an icon which would launch an SSH session with a restricted shell and an easy editor like nano. Or sshfs could be used to mount a specific remote directory containing copies of the files and that way the graphical editor of your choice could be used. For that you'd have to have incron watching those copies.

However, since you mention tablet or phone that makes the task worlds more difficult. You might just have to search in the search engines for "web-based linux editor" or similar and then slog through the results, keeping note of what is worth a second look.

TB0ne 09-21-2020 01:36 PM

Quote:

Originally Posted by mackowiakp (Post 6168320)
So in short words. I made - by adding some software I wrote - from a Linux-based satellite receiver, a radio receiver streaming Internet radios. It works independently of the Sat function. The software contains a text file with lines containing the name of the internet station and the URL to it. And it is this file (for example) I would like to be easy to edit. Such editing would not allow access to any file other than those indicated. And once I saw an application that allowed my dad to edit via WEB. It had the form as below.
Code:

name_of_application file1 file2 file3 # set of files for editing
In the displayed WEB page, a column with files to be edited was displayed on the left side, and the screen rest was occupied by the file you clicked on in the list in the right column. It was definitely a project from GitHub. But I don't remember his name. Hence my question.

Sorry, but no...ANY file you put out for editing is an attack vector into your system, and if you truly believe that only your dad is going to be able to edit that file, you're mistaken. Again, this is *ABSOLUTELY HORRIBLE* in terms of security.

But why don't you approach the problem in a more secure way? Why not have your dad email a specific address, and you have a local program that checks that email address for emails from your dad, and simply download the mail-body into that file?

mackowiakp 09-21-2020 01:46 PM

Isnt HTTPS with user/pass auth enough secure?


All times are GMT -5. The time now is 04:44 AM.