close

how to add existing user to existing group,  just by few lines of command

usermod -a -g apache neil

將neil新增至apache,此時打groups 可能會看不到apache群組,不過沒關係。

接著打newgrp apache ,將apache變成有效的群組。 透過這樣子的變動讓你可以輕輕鬆鬆改動Apache下的/var/www/html的網頁,

不然每次透過VsCode都需要用用sudo的權限去存檔超麻煩=口=

 

 

參考鏈結 

Group Add or modify existing user and group

https://www.cyberciti.biz/faq/howto-linux-add-user-to-group/

arrow
arrow

    蕭瑞文 發表在 痞客邦 留言(0) 人氣()