Gitea: File looses executable bit after editing through web interface

Created on 6 Aug 2019  路  7Comments  路  Source: go-gitea/gitea

Description

When I edit a file through Gitea's web interface, the file's modes are (re)set to 644, effectively losing the executable bit if it was set.

I understand that it's not trivial to change file modes through the web interface (eg. when creating new files), but I believe existing files should keep their modes.

The git log of the above repository:

commit 1635a011929aadf493be0863fb936f56b6ed4188
Author: Jo Vandeginste <Jo.Vandeginste@>
Date:   Tue Aug 6 11:42:38 2019 +0200

    Add an executable script

    Signed-off-by: Jo Vandeginste <Jo.Vandeginste@>

diff --git a/script b/script
new file mode 100755
index 0000000..516115d
--- /dev/null
+++ b/script
@@ -0,0 +1 @@
+Some command

commit b7aa45df3b4cb3a085e5b10cae36fbf4c8fed170
Author: jovandeginste <jo.vandeginste@>
Date:   Tue Aug 6 09:44:40 2019 +0000

    'script' updaten

diff --git a/script b/script
old mode 100755
new mode 100644
index 516115d..fa29636
--- a/script
+++ b/script
@@ -1 +1,3 @@
 Some command
+
+some edit
\ No newline at end of file
kinbug revieweconfirmed

Most helpful comment

hi,

can we get this issue fixed? This is really annoying, especially when you work on scripts for infrastructure.

All 7 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

So... it just won't be fixed then? What a strange procedure!

hi,

can we get this issue fixed? This is really annoying, especially when you work on scripts for infrastructure.

+1 I can confirm this bug too
Running Gitea 1.9.5

Has this been fixed?

@jovandeginste Yes, we've just merged a PR fixing this on the master branch (which will become Gitea 12.0 eventually). See #10607.

It will be in version 1.11.2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thehowl picture thehowl  路  3Comments

BNolet picture BNolet  路  3Comments

adpande picture adpande  路  3Comments

jakimfett picture jakimfett  路  3Comments

cookiengineer picture cookiengineer  路  3Comments