You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In the setPermissions function in cmd_unix.go, it mistakes the value of '1' as being an octal file mode instead of it's intended value of true. This causes the backend struct to have a umask of 776 and as a result all files pushed to the server via LFS will end up with an object file with the permissions 001 / --------x.
Setup
Please complete the following information along with version numbers, if applicable.
OS [Ubuntu 22.04 LTS]
Shell [bash]
Note: you might encounter rendering issues if your locale does not use UTF-8 encoding. Please check your locale (locale on POSIX systems) to
see what encoding is being used by your system.
To Reproduce
Steps to reproduce the behavior:
Make a shared git repo using the command git init --bare --shared. (You can manually check the git config for the repo to ensure that core.sharedrepository=1. It may not be for you, but it did for me, which triggered the bug.)
Initialize git-lfs using git lfs install
Add git-lfs-transfer to the PATH
Clone the repo somewhere else using ssh git clone ssh://server:/path/to/myrepo.git
Add a file to the repo and tell git-lfs to track it.
Commit the file and push to the server.
Expected behavior
Since I used the --shared flag when creating the repo, and in cmd_unix.go the switch statement on the shared repository option includes an option for "true" which acts the same as "group", I would expect the permissions to be set to 660 which would mean the umask would be 117.
The text was updated successfully, but these errors were encountered:
Describe the bug
In the
setPermissions
function incmd_unix.go
, it mistakes the value of '1' as being an octal file mode instead of it's intended value of true. This causes the backend struct to have a umask of 776 and as a result all files pushed to the server via LFS will end up with an object file with the permissions001
/--------x
.Setup
Please complete the following information along with version numbers, if applicable.
Note: you might encounter rendering issues if your locale does not use
UTF-8
encoding. Please check your locale (locale
on POSIX systems) tosee what encoding is being used by your system.
To Reproduce
Steps to reproduce the behavior:
git init --bare --shared
. (You can manually check the git config for the repo to ensure thatcore.sharedrepository=1
. It may not be for you, but it did for me, which triggered the bug.)git lfs install
git-lfs-transfer
to the PATHgit clone ssh://server:/path/to/myrepo.git
git-lfs
to track it.Expected behavior
Since I used the
--shared
flag when creating the repo, and incmd_unix.go
the switch statement on the shared repository option includes an option for "true" which acts the same as "group", I would expect the permissions to be set to660
which would mean the umask would be117
.The text was updated successfully, but these errors were encountered: