"Composer root 경고메시지 해제"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
1번째 줄: 1번째 줄:
;<nowiki>Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted</nowiki>
;<nowiki>Do not run Composer as root/super user! See https://getcomposer.org/root for details</nowiki>
;<del><nowiki>Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted</nowiki></del>
;How to set COMPOSER_ALLOW_SUPERUSER
;How to set COMPOSER_ALLOW_SUPERUSER
;root 경고메시지 해제
;root 경고메시지 해제


==문제상황==
==문제상황==
{{소스헤더|composer v2.6}}
<syntaxhighlight lang='console'>
root@zetawiki:~# composer -V
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Composer version 2.6.6 2023-12-08 18:32:26
</syntaxhighlight>
{{소스헤더|composer v1.1}}
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~# composer -V
root@zetawiki:~# composer -V
9번째 줄: 19번째 줄:
Composer version 1.1.1 2016-05-17 12:25:44
Composer version 1.1.1 2016-05-17 12:25:44
</syntaxhighlight>
</syntaxhighlight>
:→ root 계정으로 composer 를 실행하면 경고 메시지가 뜬다...


==임시 적용==
==임시 적용==

2024년 1월 13일 (토) 18:02 판

Do not run Composer as root/super user! See https://getcomposer.org/root for details
Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
How to set COMPOSER_ALLOW_SUPERUSER
root 경고메시지 해제

1 문제상황

composer v2.6
root@zetawiki:~# composer -V
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Composer version 2.6.6 2023-12-08 18:32:26
composer v1.1
root@zetawiki:~# composer -V
Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
Composer version 1.1.1 2016-05-17 12:25:44

2 임시 적용

root@zetawiki:~# export COMPOSER_ALLOW_SUPERUSER=1
root@zetawiki:~# env | grep COMPOSER_ALLOW_SUPERUSER
COMPOSER_ALLOW_SUPERUSER=1
root@zetawiki:~# composer -V
Composer version 1.1.1 2016-05-17 12:25:44
→ 현재 세션에 적용됨

3 영구 적용

root@zetawiki:~# echo "export COMPOSER_ALLOW_SUPERUSER=1" >> ~/.bashrc
root@zetawiki:~# cat ~/.bashrc | grep export
export LANG=en_US.UTF-8
export COMPOSER_ALLOW_SUPERUSER=1
.bashrc에 등록하면 다음번 SSH 접속시부터 계속 적용됨

4 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}