I'm trying to set up a fresh install of drupal on on linux box and I'm getting the error:
我正在尝试在linux机器上安装一个全新的drupal,我收到错误:
Settings file The settings file does not exist. The Drupal installer requires that you create a settings file as part of the installation process. Copy the ./sites/default/default.settings.php file to ./sites/default/settings.php. More details about installing Drupal are available in INSTALL.txt.
设置文件设置文件不存在。 Drupal安装程序要求您在安装过程中创建设置文件。将./sites/default/default.settings.php文件复制到./sites/default/settings.php。有关安装Drupal的更多详细信息,请参见INSTALL.txt。
I have set the permissions for the settings.php file but it is still doing it. sites,default and files all have 777 permissions but it still won't work. I have both the default.settings.php and settings.php in the default folder.
我已经设置了settings.php文件的权限,但它仍在执行此操作。网站,默认和文件都有777权限,但它仍然无法正常工作。我在默认文件夹中有default.settings.php和settings.php。
Thanks
3 个解决方案
#1
1
You have to keep in mind some things:
你必须记住一些事情:
- Your web server has to have the permission to run your code. If you are using Ubuntu, it would be better if you give www-data.www-data (user and group) permission to sites/default folder
- To give 777 to files is dangerous because someone else can read this sensible file
- Remember that all folders, including your Drupal root folder has to be readable, which means it has to have some thing like 755 permission.
您的Web服务器必须具有运行代码的权限。如果您使用的是Ubuntu,那么将www-data.www-data(用户和组)权限授予sites / default文件夹会更好
给文件777是危险的,因为其他人可以读取这个合理的文件
请记住,所有文件夹(包括Drupal根文件夹)都必须是可读的,这意味着它必须具有755权限。
Most time, this problem is related to the user running the web server and files.
大多数时候,这个问题与运行Web服务器和文件的用户有关。
#2
1
Change back the settings.php
permission.change settings.php permission to 755
. (read only, to make protected
)
将settings.php permission.change settings.php权限更改回755.(只读,保护)
Step by step:
一步步:
-
Copy file default.settings.php to settings.php (do not rename). Now you have both files.
将文件default.settings.php复制到settings.php(不要重命名)。现在你有两个文件。
-
Change file permission settings.php to read/write with chmod 644 settings.php
使用chmod 644 settings.php更改文件权限settings.php以进行读/写
-
Continue the installation..
继续安装..
-
After all installation finished, change file permission settings.php to read-only with chmod 755 settings.php
完成所有安装后,使用chmod 755 settings.php将文件权限settings.php更改为只读
I hope it helps you
我希望它对你有所帮助
#3
0
I have fixed that by this:
我已经解决了这个问题:
chown -Rv apache:apache /var/www
#1
1
You have to keep in mind some things:
你必须记住一些事情:
- Your web server has to have the permission to run your code. If you are using Ubuntu, it would be better if you give www-data.www-data (user and group) permission to sites/default folder
- To give 777 to files is dangerous because someone else can read this sensible file
- Remember that all folders, including your Drupal root folder has to be readable, which means it has to have some thing like 755 permission.
您的Web服务器必须具有运行代码的权限。如果您使用的是Ubuntu,那么将www-data.www-data(用户和组)权限授予sites / default文件夹会更好
给文件777是危险的,因为其他人可以读取这个合理的文件
请记住,所有文件夹(包括Drupal根文件夹)都必须是可读的,这意味着它必须具有755权限。
Most time, this problem is related to the user running the web server and files.
大多数时候,这个问题与运行Web服务器和文件的用户有关。
#2
1
Change back the settings.php
permission.change settings.php permission to 755
. (read only, to make protected
)
将settings.php permission.change settings.php权限更改回755.(只读,保护)
Step by step:
一步步:
-
Copy file default.settings.php to settings.php (do not rename). Now you have both files.
将文件default.settings.php复制到settings.php(不要重命名)。现在你有两个文件。
-
Change file permission settings.php to read/write with chmod 644 settings.php
使用chmod 644 settings.php更改文件权限settings.php以进行读/写
-
Continue the installation..
继续安装..
-
After all installation finished, change file permission settings.php to read-only with chmod 755 settings.php
完成所有安装后,使用chmod 755 settings.php将文件权限settings.php更改为只读
I hope it helps you
我希望它对你有所帮助
#3
0
I have fixed that by this:
我已经解决了这个问题:
chown -Rv apache:apache /var/www