WebIDE changes file permission of files when renaming or moving to different directory
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When editing an executable file using GitLab's WebIDE, the executable
bit is removed if the file is moved to a different directory or renamed.
Steps to reproduce
Steps to Reproduce
- On local, create a file called
test.sh
, and grant it executable permissions.
chmod +x test.sh
- Commit and push to
main
on GitLab. - Open the project in Web IDE.
- Move the
test.sh
file to a folder calledxyz
. - Commit and push from WebIDE on a different branch -
feature/moved-to-directory-via-webide
. - Raise an MR from
feature/moved-to-directory-via-webide
to main, you can then see in the diff that the permissions has changed from100755
to100644
. - Open another session for the project in the Web ID.
- Rename the
test.sh
file tonew.sh
. - Commit and push from WebIDE on a different branch -
feature/renamed-via-webide
. - Raise an MR from
feature/renamed-via-webide
to main, you can then see in the diff that the permissions has changed from100755
to100644
.
Example Project
- kballon-bug-report/zd646337_webide_changes_permission!1 (closed)
- kballon-bug-report/zd646337_webide_changes_permission!2 (closed)
What is the current bug behavior?
The permissions are not properly retained after renaming or moving the files.
What is the expected correct behavior?
The permissions should be retained after renaming or moving the files.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Patch release information for backports
If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.
Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.
High-severity bug remediation
To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.