linux /opt/tomcat permission denied

在看了其他網友的安裝 tomcat 教學,把tomcat 安裝到 /opt/tomcat/ 目錄下,

並透過下面的指令把 max(我的帳號) 加到到 tomcat 裡,也看不到檔案。呵呵。

Add User To The Group In Linux

To add user to group in Linux, use the “usermod –a –G groupname username” command followed the name of the group and the user.

sudo usermod -a -G groupname username

There is no information that your command was successful, usermod command does not display any output. It warns you only if the user or group doesn’t exist. Always use the –a (append) option when adding a user to a new group. If you don’t, user will be removed from any other group, and only will be in the group you just added him.


解法:
https://stackoverflow.com/questions/61427783/tomcat-is-not-getting-started-permission-denied

Looks like

chmod a+rx /opt /opt/tomcat/ /opt/tomcat/bin

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *