Hello,

On Wed, Jun 21, 2023 at 12:57:41PM +0100, Joe wrote:
> On Tue, 20 Jun 2023 17:34:45 -0400
> gene heskett <ghesk...@shentel.net> wrote:
> >  My fav editor, geany is also
> > dead for roots use for exactly he same reason, but runs just fine as
> > me. So there is a common problem.
> 
> Well, you could do it the right way: edit as you with geany in a work
> directory, copy to/from the real location with a root-powered file
> manager, such as mc under sudo in a terminal. Alter owner/perms as
> required with mc.

The idea that this is the "right" way kind of horrifies me. 😀

Not that I would attempt to suggest that Gene goes this way, but
feature rich editors like vim and emacs can easily write to files
through sudo or sftp, thus enabling seamless editing of files as
different users and even on different hosts.

I'm sure there are other advanced editors that can do the same.
Maybe geany can; I'm not familiar with it. The basic principle being
to edit a file as sftp://user@host:/path so as to do the read/write
as that user, not yourself. (host could be localhost).

To me, that is closer to the "right" way to do this sort of thing.
It's really worth spending the time to learn how to do this sort of
thing in one of the advanced editors.

For a quick workaround though, and for Gene's case, sure.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Reply via email to