Linux 解决Deepin无法在root用户启动Google Chrome浏览
1.找到Chrome的路径
which google-chrome
假如路径为:/usr/bin/google-chrome
2.编辑google-chrome文件
打开google-
解决Deepin无法在root用户启动Google Chrome浏览器的问题,步骤如下。 1.找到Chrome的路径 which google-chrome 假如路径为:/usr/bin/google-chrome 2.编辑google-chrome文件 打开google-chrome,修改文件末尾命令。 vim /usr/bin/google-chrome 在 exec -a " 按Esc,:wq,退出保存,现在即可打开Chrome浏览器了! ps:下面看下用非root用户启动Apache|Nginx的方法 众所周知,apache的80端口为系统保留端口,如果通过其他非root用户启动,会报错如下: (13)Permission denied: make_sock: could not bind to address [::]:80 (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs 因为普通用户只能用1024以上的端口linux浏览器,1024以内的端口只能由root用户使用。 但是为了避免每次启动都通过root用户,可以通过set UID的方式来解决此问题。 一次性进行如下操作即可完成。 在root用户环境中做如下操作 cd ……/apache/bin chown root httpd chmod u+s httpd 再 su – USERNAME 到普通用户下,通过 ……/apache/bin/apachectl start即可 为何不chmod u+s apachectl呢? 因为set UID这种方式只针对二进制文件有效,而tail一下apachectl发现: apachectl是一个脚本文件,仔细查阅发现有如下一句 (编辑:威海站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |