My university decided to not give admin privileges automatically. So I thought I will try installing it in user mode on the university provided Mac (Mojave). I installed TexLive 2019 (option -gui -text) with two changes: root directory is ~/texlive and TEXMFHOME is ~/texmf. I left TEXMFVAR and TEXMFCONFIG in ~/Library/texlive default. I also added the appropriate line to .bashrc (sourced from .bash-profile) to fix up the path.
Now when I try to tex a file I get the following error message: =>> lstat(./pdftex) failed: ./pdftex: No such file or directory =>> kpathsea: Can't get directory of program name: ./pdftex Path is set correctly: texlua --help produces the expected output
The error message makes sense to me only if kpathsea thinks that it has successfully cd'ed to the directory containing the binary of the program being invoked, but it has not. That means that it is a simple permissions issue. All directories involved show "drwxr-xr-x" and no "+" or "@" at the end. That is the extent of my knowledge of permissions. So I can't figure out what is going on.
Addendum: Following a suggestion elsewhere I tried a portable installation. It has the same problem. I have also tried putting texmf-var and texmf-config in a directory in home, rather than in ~/Library. This also makes no difference. I tried creating symlinks to ~/bin etc, and put ~/bin in the path. No dice.
Finally, "which" will not show the commands in directories I add to path. So texlua --help produces the expected output, but which texlua does nothing.