Skip to content

File looses executable bit after editing through web interface #7771

@jovandeginste

Description

@jovandeginste

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions