#12 file editor capable of using $HOME?

closed
nobody
None
6
2004-04-27
2002-10-23
Windseeker
No

Hi!

It would be wonderful, if the file editor in section "custom
commands" would be able to handle $HOME.

I want to give Usermin users the ability to edit a config
file in their home directory, in my case
$HOME/.spamassassin/user_prefs

So we need to replace the $HOME with the users
homedir like this:

File: usermin/commands/view.cgi
File: usermin/commands/search.cgi

$homedir = (getpwnam($remote_user))[7];
$edit->{'edit'} =~ s/\$HOME/$homedir/g;

I tries this change for myself and it sseems to work fine.

Greets,
Daniel

Discussion

  • Windseeker
    Windseeker
    2003-02-16

    • priority: 5 --> 6
     
  • Windseeker
    Windseeker
    2003-02-16

    Logged In: YES
    user_id=530391

    Hi!

    I want to remind this feature! It seems to work fine with the mentioned
    changes!

     
  • Jamie Cameron
    Jamie Cameron
    2004-04-27

    Logged In: YES
    user_id=129364

    This feature is implemented in Webmin 1.140.

     
  • Jamie Cameron
    Jamie Cameron
    2004-04-27

    • status: open --> closed