解決:E212:Can't open file for writing

事件:在今天新建的用戶下需要把安裝的ruby的環境變量添加到/etc/profile中,但是由於是新建的用戶,沒有對profile賦予權限,所以報錯:

在這裏插入圖片描述

"/etc/profile"  E212:Can't open file for writing 

文件最後裏添加的是

#ruby
export PATH=/usr/local/ruby/bin:$PATH

解決:於是進入root用戶之後,執行:

chmod  755 /etc/profile

具體參照:權限解釋說明

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章