gpt4 book ai didi

mysql - 主用户无法在 SSH 中编辑或运行脚本、cronfile

转载 作者:行者123 更新时间:2023-11-30 01:24:31 28 4
gpt4 key购买 nike

我有一个 VPS,采用 Intel XeonCPU E3-1270 V2 @ 3.50GHz,在 OpenVZ Webuzo + nginx 上运行

我曾经以主用户身份通过​​ SSH 编辑 cronjobs 或其他文件。但在重新启动MySQL以修复突然的CPU使用率峰值后,我似乎失去了所有特权。

我在打开、访问或保存文件时遇到这些错误:

"user is not in the sudoers file. This incident will be reported.”

[user@vm root]$ php info.php
Could not open input file: info.php
[user@vm root]$ vi hello.text
E212: Can't open file for writing"

当我运行 crontab -e 和 crontab -l 时,它们什么也不返回。他们只是表明:

[user@vm root]$ crontab -e
[user@vm root]$

不确定这是否与我重新启动服务器、httpd 和 MySQL 有关。我应该怎么做才能将权限恢复给主用户?

最佳答案

[user@vm root]$ php info.php
Could not open input file: info.php
[user@vm root]$ vi hello.text
E212: Can't open file for writing"

It seems you are logged in as the "user" and your current location is /root. You are allowed to write contents to /home/user and not /root if you are logged in as the "user".

当我运行 crontab -e 和 crontab -l 时,它们什么也不返回。

Possibly your CRON service is not responding for some reason. Re-installing the service will be a quick fix.

我应该怎样做才能将权限恢复给主用户?

su - and fill in your root users' password to get you privileges.

祝你好运

关于mysql - 主用户无法在 SSH 中编辑或运行脚本、cronfile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18165823/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com