I am hacking away on a remote helper for git. The script is in bourne shell.
I wanted to create some temporary directory in the home dir. For some reason I get permission denied. From my shell directly I can run the same command without problems.
All the Environment vars look normal, $HOME, $USER, ... The homedir has normal permissions set (eg. everything is owned an writable by the user). I'm using debian testing.
This is the offending command:
mkdir --mode=600 --parents /home/<user>/.tmp/$$
The peculiar thing is also that the directory is effectively created, but the next line that tries to put a file in it has a permission denied again and this time the file is not created.
The shell is running with:
set -e # errexit set -u # nounset set -f # noglob set -C # noclobber set -x
but without them I still get permission denied.
ps: I just tried in the $GIT_DIR, to which the user has write privileges too, and also permission denied, but this time not on the directory creation, but on the file creation the next line.
So how do I find out who is denying me and why?