Using fs.chmod(path, mode, callback), I set the mode 777. This did not work. But when I installed it in 0777, it worked.
fs.chmod(path, mode, callback)
777
0777
So, I want to know what is the difference between chmod 777and chmod 0777?
chmod 777
chmod 0777
A leading zero in 0777indicates that the number is an octal number .
An 777octal number 511is a decimal number . fs.chmod(path, 0777)and fs.chmod(path, 511)they do the same, but fs.chmod(path, 777)no.
511
fs.chmod(path, 0777)
fs.chmod(path, 511)
fs.chmod(path, 777)
, , 777 . , chmod unix .