Skip to content

Commit

Permalink
Use mode=0755 when creating dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
jarun committed May 27, 2019
1 parent b767d33 commit 75768ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nnn.c
Expand Up @@ -2538,7 +2538,7 @@ static bool create_dir(const char *path)
if (errno != ENOENT)
return FALSE;

if (mkdir(path, 0777) == -1)
if (mkdir(path, 0755) == -1)

This comment has been minimized.

Copy link
@jarun

jarun Sep 10, 2019

Author Owner

I see a comment here (http://www.opennet.ru/openforum/vsluhforumID3/117475.html#47) on whether we have heard about umask. To answer that:

Go read the man page of mkdir, asshole! umask is done internally by mkdir (transparent to the caller) and may vary according to user preference. There's absolutely nothing wrong with being explicit about your preferred mode.

And if you think you one smart asshole, PR, asshole!

return FALSE;
}

Expand Down

0 comments on commit 75768ad

Please sign in to comment.