Re: Weirdness with vi
On Tue, 30 Nov 1999 at 10:20:37 -0700, Don Hatch wrote:
> Thanks everyone, turns out that vi was trying to create temp files in /tmp
> so I had to change permissions. Thanks for the help.
>
> Don
Of course, make sure that /tmp has the sticky bit.
BTW, when one invokes vi without filename to be edited (just 'vi' instead
of 'vi blabla'), the temporary file is created in /tmp (e.g.
/tmp/vi.a00588); at least on my system. It may be susceptible to "symlink
attack" against root. So I suggest that root has got environment variable
TMPDIR set to his home directory (/root) for security reasons.
To achieve this, place export TMPDIR=/root for instance in
/root/.bash_profile
Now if root invokes vi without filename, a file like this is created:
/root/vi.a00719
Good luck
--
Tomasz Papszun SysAdm @ TP S.A. Lodz, Poland | And it's only
tomek@lodz.tpsa.pl http://www.lodz.tpsa.pl/ | ones and zeros.
> On Tue, 30 Nov 1999 at 8:46:40 -0700, Don Hatch wrote:
>
> > I've never seen this one before so I would really appreciate any help I
> can get. My users can't seem to be able to get vi to work. If I use it
> as root it works but when run as a user I get this error:
> >
> > ex/vi: Error: Log file: Permission denied
> >
Reply to: