git ftp init does not preserve file permissions
Open
Nobody has claimed this yet.
confirmed
enhancement
- Dominant language
- Shell
- Stars
- 5.6k
- Forks
- 694
- PR merge metrics
- No merged PRs in 30d
Description
Bug
... at least over SFTP:
$ git init
$ git config git-ftp.user myuser
$ git config git-ftp.url sftp://my.serv.er/~www/foo
$ echo foo >bar
$ chmod +x bar
$ git add bar
$ git commit -m initial
$ git ftp init
Now the uploaded bar has modes -rw-r--r-- while the one in my repository has modes -rwxr-xr-x. Indeed:
$ git ftp download
$ git diff
diff --git i/bar w/bar
old mode 100755
new mode 100644
Environment
$ echo "$SHELL"
/bin/bash
$ uname -a
Linux lant 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux
$ git-ftp version
git-ftp version 1.4.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the git ftp init entry point and trace the SFTP upload path, comparing the repository mode with the uploaded file. Reproduce the example with bar, then run git ftp download and git diff to verify the executable mode is preserved; done means the uploaded file retains its repository permissions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, shell
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100