4

No matter what chmod command I run, I am always getting

chmod: illegal option -- - usage: chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a [i][# [ n]]] mode|entry file ... chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ... 

I am on macOS Sierra and I get the same issue on both "Terminal" as well as "iTerm2".

I have also been able to use chmod without issues on this machine in the past 2 years.

4
  • 6
    Do you have chmod aliased to something? what does type chmod say? Commented Oct 16, 2019 at 16:27
  • @steeldriver chmod is aliased to `chmod --preserve-root' Commented Oct 17, 2019 at 8:00
  • 1
    So this is possibly related: Why does my ls --help not work? - I don't think OSX chmod supports long options such as --preserve-root Commented Oct 17, 2019 at 11:37
  • 1
    that was it! perfect. thanks. Can u pls add this as an answer so i can accept. Commented Oct 17, 2019 at 12:53

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.