From 5725308b7787e2f75c497823f3f263c4ca6bb7fc Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Sun, 12 Mar 2017 20:12:35 +0100 Subject: [PATCH 1/2] Set POSIX filepermissions to 644 Fix for #2635 --- .../java/org/jabref/logic/exporter/FileSaveSession.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/logic/exporter/FileSaveSession.java b/src/main/java/org/jabref/logic/exporter/FileSaveSession.java index 14514cd4ad7..60c1eb00d73 100644 --- a/src/main/java/org/jabref/logic/exporter/FileSaveSession.java +++ b/src/main/java/org/jabref/logic/exporter/FileSaveSession.java @@ -38,7 +38,6 @@ public class FileSaveSession extends SaveSession { private static final String TEMP_SUFFIX = "save.bib"; private final Path temporaryFile; - public FileSaveSession(Charset encoding, boolean backup) throws SaveException { this(encoding, backup, createTemporaryFile()); } @@ -86,8 +85,12 @@ public void commit(Path file) throws SaveException { LOGGER.error("Error when creating lock file.", ex); } - // Try to save file permissions to restore them later (by default: allow everything) - Set oldFilePermissions = EnumSet.allOf(PosixFilePermission.class); + // Try to save file permissions to restore them later (by default: 664) + Set oldFilePermissions = EnumSet.of(PosixFilePermission.OWNER_READ, + PosixFilePermission.OWNER_WRITE, + PosixFilePermission.GROUP_READ, + PosixFilePermission.GROUP_WRITE, + PosixFilePermission.OTHERS_READ); if (FileUtil.isPosixCompilant && Files.exists(file)) { try { oldFilePermissions = Files.getPosixFilePermissions(file); From 0de74fa911ed3678c2f290effe521085486f9933 Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Sun, 12 Mar 2017 20:35:04 +0100 Subject: [PATCH 2/2] Add changelog and add missing dots --- CHANGELOG.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14f0e536348..0c139734475 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,9 +62,10 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - We fixed an issue where the `Move linked files to default file directory`- cleanup operation did not move the files to the location of the bib-file. [#2454](https://github.com/JabRef/jabref/issues/2454) - We fixed an issue where executing `Move file` on a selected file in the `general`-tab could overwrite an existing file. [#2385](https://github.com/JabRef/jabref/issues/2358) - We fixed an issue with importing groups and subgroups [#2600](https://github.com/JabRef/jabref/issues/2600) - - Fixed an issue where title-related key patterns did not correspond to the documentation [#2604](https://github.com/JabRef/jabref/issues/2604) [#2589](https://github.com/JabRef/jabref/issues/2589) - - We fixed an issue which prohibited the citation export to external programms on MacOS [#2613](https://github.com/JabRef/jabref/issues/2613) - - We fixed an issue where the file folder could not be changed when running `Get fulltext` in the `general`-tab [#2572](https://github.com/JabRef/jabref/issues/2572) + - Fixed an issue where title-related key patterns did not correspond to the documentation. [#2604](https://github.com/JabRef/jabref/issues/2604) [#2589](https://github.com/JabRef/jabref/issues/2589) + - We fixed an issue which prohibited the citation export to external programms on MacOS. [#2613](https://github.com/JabRef/jabref/issues/2613) + - We fixed an issue where the file folder could not be changed when running `Get fulltext` in the `general`-tab. [#2572](https://github.com/JabRef/jabref/issues/2572) + - Newly created libraries no longer have the executable bit set under POSIX/Linux systems. The file permissions are now set to `664 (-rw-rw-r--)`. [#2635](https://github.com/JabRef/jabref/issues/#2635) ### Removed