<i>directory creation temporarily changes the umask</i> status still Open with 4 other changes
by
.
D 2026-10-17T09:00:11.917
J foundin 8.6.18,\s9.0.5,\s9.1.0
J icomment Confirmed,\sand\sworse\sthan\stemporary:\swith\sseveral\sthreads\srunning\s<nowiki>[file\smkdir]</nowiki>,\sthe\sprocess\sumask\sends\sup\spermanently\sat\s0,\sso\slater\sfiles\sare\screated\sworld-writable\s(main,\s9.0,\s8.6).\nProposed\sfix\sin\sbranch\s[/timeline?r=mkdir-no-umask-call|mkdir-no-umask-call],\swith\s[623585ffff]:\scall\smkdir(path,\s0777)\sand\slet\sthe\skernel\sapply\sthe\sumask;\sumask()\sis\snot\scalled\sany\smore.\sThe\spermissions\sof\snew\sdirectories\sdo\snot\schange.\sTest\sunixFCmd-5.2.\nThe\sold\scode\salso\smeant\sto\salways\sadd\su+rwx,\sbut\sthat\snever\sworked,\sbecause\smkdir()\sapplies\sthe\sumask\sonce\smore\s(umask\s0700\sgives\s077).\sIt\scould\sbe\sdone\swith\schmod()\safter\smkdir(),\sbut\sthat\swould\schange\sthe\spermissions\sof\snew\sdirectories\sunder\ssuch\sumasks,\sand\sit\sis\snot\sdocumented,\sso\sthe\sbranch\sdoes\snot\sdo\sit.
J login serhiy.storchaka
J mimetype text/x-fossil-wiki
K cd609219f5522f3191a68a84deb51a968dfb8cac
U serhiy.storchaka
Z 196974339bc146e22ba02b31a266f8bb