Ubuntu /etc/profile权限不够

Ubuntu /etc/profile权限不够

出现问题的时间比较长了,一直不知道怎么解决(网上也没搜到类似问题),也不知道什么原因。今天试着找了一下解决方法,成功解决了问题。

问题描述

/usr/sbin/lightdm-session:行 29: /etc/profile:权限不够
读取/etc/profile时发现错误
作为结果,会话不会被正确配置

问题如下图
Ubuntu /etc/profile权限不够_第1张图片

解决方法

用文本的方式打开了/usr/sbin/lightdm-session和/etc/profile,很惭愧,看不懂。看着问题中主要是/etc/profile的权限问题导致读取错误,于是搜了一下/etc/profile权限的相关问题,觉得可能是没有source /etc/profile导致的问题。于是尝试source /etc/profile,但是提示还是没有权限,又搜索了source /etc/profile没有权限,按照网上的方法解决了source /etc/profile没有权限的问题后,再source /etc/profile就解决了上述问题。

具体步骤如下:
1. chmod 777 /etc/profile
2. source /etc/profile

重启后就不会出现上述图片中的问题

参考链接

[1] https://www.jianshu.com/p/d06c0487c830
[2] https://zhidao.baidu.com/question/694316987755116844.html
[3] https://askubuntu.com/questions/912573/ubuntu-login-loop-lightdm-session-errors?noredirect=1
[4] https://blog.csdn.net/alihouzi/article/details/44497923

你可能感兴趣的:(Ubuntu /etc/profile权限不够)