Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux中使用 提示权限不够的解决办法 #197

Closed
zheng7fu2 opened this issue May 26, 2023 · 2 comments
Closed

Linux中使用 提示权限不够的解决办法 #197

zheng7fu2 opened this issue May 26, 2023 · 2 comments

Comments

@zheng7fu2
Copy link

sudo sed -i "/# GitHub520 Host Start/Q" /etc/hosts && curl https://raw.hellogithub.com/hosts >> /etc/hosts
提示权限不够 : /etc/hosts

上网查询找到解决办法:
https://blog.csdn.net/change_can/article/details/115128218

sudo sh -c 'sed -i "/# GitHub520 Host Start/Q" /etc/hosts && curl https://raw.hellogithub.com/hosts >> /etc/hosts'

@xiatian12345
Copy link

权限不够的问题确实可以解决,但是这个方法不能和crontab配合使用啊,定时任务怎么能解决输入密码的问题呢

@taotieren
Copy link

我在 systemd 中增加了 root 权限的处理,可以参考这种方式 #212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@zheng7fu2 @521xueweihan @taotieren @xiatian12345 and others