Skip to content

Commit fdb07f2

Browse files
author
Ahmed Bilal
committed
Add release notes for umask file permissions change
1 parent b87c245 commit fdb07f2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README/ReleaseNotes/v640/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,25 @@ The following people have contributed to this new version:
4545
## Core Libraries
4646

4747
## I/O
48+
4849
* The behavior or `TDirectoryFile::mkdir` (which is also `TFile::mkdir`) was changed regarding the creation of directory hierarchies: calling `mkdir("a/b/c", "myTitle")` will now assign `myTitle` to the innermost directory `"c"` (before this change it would assign it to `"a"`).
4950
* Fixed a bug in `TDirectoryFile::mkdir` where passing `returnExistingDirectory = true` would not work properly in case of directory hierarchies. The option is now correctly propagated to `mkdir`'s inner invocations.
51+
### File Permissions Now Respect System `umask`
52+
53+
ROOT now respects the system `umask` when creating files, following standard Unix conventions.
54+
55+
**Previous behavior:** Files were created with hardcoded `0644` permissions (owner read/write, group/others read-only), ignoring the system `umask`.
56+
57+
**New behavior:** Files are created with `0666` permissions masked by the system `umask` (`0666 & ~umask`), consistent with standard Unix file creation functions like `open()` and `fopen()`.
58+
59+
**Impact:**
60+
- **Users with default `umask 022`** (most common): No change - files are still created as `0644`
61+
- **Users with stricter `umask` values** (e.g., `0077`): Files will now be created with more restrictive permissions (e.g., `0600` - user-only access)
62+
- **Users with permissive `umask` values** (e.g., `0002`): Files may be created with slightly more open permissions (e.g., `0664` - group-writable)
63+
64+
**Note:** If you require specific file permissions regardless of `umask`, you can set `umask` explicitly before running ROOT (e.g., `umask 022`) or use `chmod` after file creation.
65+
66+
This change affects the following classes: `TFile`, `TMapFile`, `TMemFile`, `TDCacheFile`, `TFTP`, and `TApplicationServer`.
5067

5168
### TTree
5269

0 commit comments

Comments
 (0)