1
,我們有一個名爲/srv
的文件夾,它屬於http:users
。在我的nodejs代碼中,我想創建新文件/srv/my_test/1.log
,但結果是權限被拒絕。如何在archlinux上設置文件夾用戶:group使節點可以在archlinux上創建文件
當我將/srv/my_test
從http:users
更改爲my_username:users
後,它就起作用了。
那麼當我的nodejs代碼需要在服務器上創建文件時,設置文件夾權限的正確方法是什麼?