Skip to content

Commit 34161d3

Browse files
authored
[7.6.0] Actually use 0777 when creating directories. (#25613)
This should have been a part of #23525, but was inexplicably missing when it was cherry-picked from 8c5e9da.
1 parent 8e52809 commit 34161d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/google/devtools/build/lib/unix/UnixFileSystem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ public boolean createDirectory(PathFragment path) throws IOException {
335335
// Use 0777 so that the permissions can be overridden by umask(2).
336336
// Note: UNIX mkdir(2), FilesystemUtils.mkdir() and createDirectory all
337337
// have different ways of representing failure!
338-
if (NativePosixFiles.mkdir(path.toString(), 0755)) {
338+
if (NativePosixFiles.mkdir(path.toString(), 0777)) {
339339
return true; // successfully created
340340
}
341341

@@ -355,7 +355,7 @@ protected boolean createWritableDirectory(PathFragment path) throws IOException
355355
@Override
356356
public void createDirectoryAndParents(PathFragment path) throws IOException {
357357
// Use 0777 so that the permissions can be overridden by umask(2).
358-
NativePosixFiles.mkdirs(path.toString(), 0755);
358+
NativePosixFiles.mkdirs(path.toString(), 0777);
359359
}
360360

361361
@Override

0 commit comments

Comments
 (0)