git-ftp / git-ftp/git-ftp

git ftp init does not preserve file permissions

Open
#379 6 comments 3 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.