Linux 脚本“/home/...../public_html/index.php”的 UID 小于 min_uid
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9711085/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
UID of script "/home/...../public_html/index.php" is smaller than min_uid
提问by akano1
I just moved magento from local to server and Im getting the following error, I was just wondering if someone could help me solve this,
我刚刚将 magento 从本地移动到服务器,但出现以下错误,我只是想知道是否有人可以帮我解决这个问题,
UID of script "/home/.../public_html/index.php" is smaller than min_uid
脚本“/home/.../public_html/index.php”的 UID 小于 min_uid
what I did was to make a database dump and transfer it to server,
我所做的是进行数据库转储并将其传输到服务器,
create a backup of the all the magento files and transfer and expand to server,
创建所有 magento 文件的备份并传输并扩展到服务器,
change the core_config table in the database.
更改数据库中的 core_config 表。
Thanks in advance.
提前致谢。
回答by Martin
If your script is owned by root, you should change the ownership back to yourself:
如果您的脚本归 root 所有,您应该将所有权更改回您自己:
chown -R user /home/user/public_html
chown -R user /home/user/public_html
This will change the owner of all of the files contained in /home/user/public_html
and all subdirectories to user
.
这会将包含在/home/user/public_html
所有子目录中的所有文件的所有者更改为user
.
回答by Jürgen Thelen
That looks like an suPHP issue to me.
对我来说,这看起来像是一个 suPHP 问题。
Change the user andgroup of your script to the user running your webserver process. So if you're running an Apache with user www-data
for example, change to:
将脚本的用户和组更改为运行网络服务器进程的用户。因此www-data
,例如,如果您正在使用用户运行 Apache ,请更改为:
chown www-data:www-data /home/.../public_html/index.php
Or change all your files at once by:
或者通过以下方式一次更改所有文件:
chown -R www-data:www-data /home/.../public_html/
If you're still running into this issue after changing user and group, then your suPHP is probably working with the default min_uid = 100
, but the UID of www-data
is belowthis 100.
如果你还在不断变化的用户和组之后,运行到这个问题,那么你的suPHP可能与默认的工作min_uid = 100
,但的UIDwww-data
是低于这个100。
To fix this you can change the min_uid
in suPHP's config to match the UID of www-data
:
要解决此问题,您可以更改min_uid
suPHP 的配置以匹配以下 UID www-data
:
vi /etc/suphp/suphp.conf
min_uid = <UID of www-data>
回答by agenc
I had same problem, and fixed it with logged in Ftp and uploaded files with cpanel account of this site. Not root or admin account. You must create or edit your files with this account.
我遇到了同样的问题,并通过登录 Ftp 并使用该站点的 cpanel 帐户上传文件来修复它。不是 root 或管理员帐户。您必须使用此帐户创建或编辑您的文件。
回答by Klevis Miho
What I did to fix this problem:
我做了什么来解决这个问题:
chown -R user:user /home/dibs/public_html
chown -R 用户:用户 /home/dibs/public_html
and made the php files to chmod 700
并将 php 文件设置为 chmod 700
回答by Deepanshu Jain
as far as i am getting just disable the suPHP mode in apache2, by typing this command on terminal : sudo a2dismod suphp
至于我只是在 apache2 中禁用 suPHP 模式,通过在终端上输入这个命令:sudo a2dismod suphp
if you want to enable it again : sudo a2enmod suphp
如果你想再次启用它:sudo a2enmod suphp