Skip to content

Wrong file mode/permission when opening/creating a new file [Apple Silicon, arm64, aarch64] #6983

@545ch4

Description

@545ch4

Environment Information

  • jruby 9.4.0.0-SNAPSHOT (3.0.2) 2022-01-04 5134c73021 OpenJDK 64-Bit Server VM 17.0.1+1 on 17.0.1+1 +jit [darwin-aarch64]
  • Darwin xxx.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
  • openjdk 17.0.1 2021-10-19

Expected Behavior

$ ruby -e "f = File.open('/tmp/test.txt', 'w'); f.puts 'Yeah!'; f.close"
$ stat /tmp/test.txt
16777232 4749651 -rw-r--r-- 1 johndoe wheel 0 6 "Jan  4 14:06:05 2022" "Jan  4 14:06:05 2022" "Jan  4 14:06:05 2022" "Jan  4 14:06:05 2022" 4096 8 0 /tmp/test.txt

Actual Behavior

$ jruby -e "f = File.open('/tmp/test.txt', 'w'); f.puts 'Yeah!'; f.close"
$ stat /tmp/test.txt
16777232 4751220 ---------x 1 johndoe wheel 0 6 "Jan  4 14:21:16 2022" "Jan  4 14:21:16 2022" "Jan  4 14:21:16 2022" "Jan  4 14:21:16 2022" 4096 8 0 /tmp/test.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions