Shell variables are set using the syntax
name=value. There must not be any [unquoted] whitespace characters in the declaration.
# ^ remove space here
The space in your usage was invoking the other usage of
name=value, i.e. temporarily setting environment variables for a single program invocation.
# set environment variable "foo" to "bar" for this invocation of "program"
# set "baz" to an empty value for the invocation of "program"
The reason you were getting a permission denied error on
path1= "./src/$1" was because it was taken to mean "Set environment variable path1 to empty and invoke program ./src/$1" and since
./src/$1 doesn't have its executable bit set it failed.