idank / explainshell

match command-line arguments to their help text
GNU General Public License v3.0
12.98k stars 778 forks source link

Wrong numerical file permissions #311

Closed MannyAdumbire closed 1 year ago

MannyAdumbire commented 1 year ago

I tried EXPLAIN install -g 0 -o 0 -m 0644 nuseradd.1 /usr/local/man/man8/. The important bits show up fine, but the 0644 was mis-explained as rwxr-xr-x. explainshell-wrong-num-perms bash-num-perms-wiki

0x00cl commented 1 year ago

Its not wrong in the sense that explainshell isn't trying to translate 0644 into letters permission. explainshell its taking that explanation from the man page of install

check man install you'll see that it says

       -m, --mode=MODE
              set permission mode (as in chmod), instead of rwxr-xr-x

Which is just showing that you can either use number or letters permission format.

MannyAdumbire commented 1 year ago

@0x00cl Got it 😅 Thanks for explaining.