permission denied for composer in /usr/local/bin/

后端 未结 9 768
隐瞒了意图╮
隐瞒了意图╮ 2020-12-30 20:16

I followed the documentation on https://getcomposer.org/doc/00-intro.md#globally to install composer globally on arch linux. When I do composer self-update, I g

相关标签:
9条回答
  • 2020-12-30 21:01

    Even after moving the file via sudo mv composer.phar /usr/local/bin/composer I was getting a permission error when trying to run the composer command. sudo chmod 755 /usr/local/bin/composer fixed things for me.

    0 讨论(0)
  • 2020-12-30 21:05

    This did the job for me on Centos 7

    chown -R apache:apache path/to/composer
    chmod 755 path/to/composer
    
    0 讨论(0)
  • 2020-12-30 21:10

    You could temporarily add the rights to your working user, then update composer w/o errors and then get back the rights.

    sudo chmod 777 /usr/bin/
    composer self-update
    sudo chmod 755 /usr/bin/
    
    0 讨论(0)
提交回复
热议问题