On Sun, 11 Oct 2015 23:46:04 -0700 (PDT)
mithril <
android...@gmail.com> wrote:
> Newest git-bash installed, but can not install git-ftp.
>
> I follow git-ftp-for-windows
> <
http://anantgarg.com/2013/09/25/git-ftp-for-windows/>:
>
> cd ~
> git clone
https://github.com/git-ftp/git-ftp git-ftp.git
> cd git-ftp.git && chmod +x git-ftp
> cp ~/git-ftp.git/git-ftp /bin/git-ftp
>
>
> But cp: cannot create regular file ‘/bin/git-ftp’: Permission denied
If you're doing this in a Git Bash window, try running
mount
and you'll see an entry for /bin listed there.
It will supposedly be mapped to something like
C:/Program Files/Git/usr/bin
Now you could see that your user's account supposedly misses the
necessary rights to create a file under a system folder.
You basically have two ways to deal with this issue:
* Continue attacking on the same front, run Git Bash as administrator
and re-try.
* Stop being straightforward, pause for a moment and think what the
call
cp ~/git-ftp.git/git-ftp /bin/git-ftp
is supposed to do.
You'll see that it merely wants to make the script `git-ftp` appear
under the /bin directory (which, on a POSIX system, is really /bin --
not emulated like in Git Bash).
Forgetting for a moment, that copying something under /bin on a POSIX
system is an utterly lame thing in itself, the basic idea this command
tries to convey to the reader is that if script `git-ftp` is
under /bin, is will be callable from the command line without
specifying its full path -- just using its bare name, "git-ftp".
So now you are able to make the next step and just append the full
path of your ~/git-ftp.git/git-ftp to the PATH environment variable to
get the same result.
Or create something like C:\Program Files\git-ftp, put git-ftp under
it and then append "C:\Program Files\git-ftp" to PATH as detailed
above.