VI command not working

okay.

kopen("/var/tmp/Ex50270", O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR) = 3
close(3)                                        = 0
kopen("/var/tmp/Ex50270", O_RDWR)               Err#13 EACCES

What this code does:
call creat() to open a new file, which returns 3 == okay
call close on 3, which is okay.
finally it tries to open the newly created file for read write and fails.
This file is the temporary workfile, and does not have anything to do with .exrc

I am guessing something weird has happened in /var/tmp. I would guess there are Exnnnnn files there with bad file attributes - the files should all be cleaned up when vi (or any other editor ) exits.

Try setting the TMPDIR variable for a user with the problem - my assumption here is that /tmp is truly a separate directory object from /var/tmp. Correct me if I'm wrong -
like tmp is a symlink to /var/tmp (I do not know AIX, except that it has tricked me in the the past.)

export TMPDIR=/tmp

Then try vi. If it works then - /var/tmp and friends have an issue.

Ok guys, I figured it out.
It was a global umask setting that got changed during an outage we had a couple weeks ago. Apparently one of the SAs changed the global umask to 0666 trying to fix an FTP permissions issue. So anyone who wasn't overriding that setting was getting all the permissions stripped from any new file being created.

I noticed that any new file that I touched had zero permissions, so any temp file created by VI wasn't able to read or write. So we've reset the global umask and everyone is good to go now.

I really appreciate the time and effort everyone put in.

Thanks!

Shawn

4 Likes