使用MAMP从Github的Drupal克隆中的文件系统和设置文件的问题

我是Drupal的新手并且正在四处寻找与我有关的问题,但我克隆了一个回购 一个Drupal构建,以便我可以与我的团队协作,并使用MAMP在本地安装。</ p>

我能够将其成功克隆到我的htdocs文件夹中,但是当我完成Drupal安装时 过程我得到以下错误,请参阅下面的灰色,因为我无法发布图像,因为我还没有10个声誉。</ p>


文件系统目录网站 / default / files不可写。 自动尝试创建此目录失败,可能是由于
权限问题。 要继续安装,请创建目录并手动修改其权限,或确保
安装程序具有自动创建权限的权限。 有关更多信息,请参阅INSTALL.txt或在线手册。</ p>
</ blockquote>

和</ p>


设置 file设置文件不可写。 Drupal安装程序
需要在
安装过程中对./sites/default/settings.php具有写权限。 如果您不确定如何授予文件权限,请参阅在线手册。</ p>
</ blockquote>

当然我不知道这意味着什么,并且想知道是什么类型的问题 我可以期待如果只是忽略它,或者更好但如何解决它而不是在以后出现意外错误的路径。</ p>

任何有关这意味着什么或它如何影响安装的帮助我 真的很感激。</ p>

最后Drupal没有询问是否安装了SQL数据库,我不确定是否会安装克隆(我怀疑不是)但是不要 我真的知道我是否应该从管理员那里获取SQL文件或是否安装它会有所帮助。</ p>

谢谢。</ p>
</ div>

展开原文

原文

I am brand new to Drupal and was looking around to find issues related to mine, but I have cloned a repo of a Drupal build so that i can collaborate with my team and also install it locally using MAMP.

I was able to clone it successfully into my htdocs folder, but when i went through the Drupal installation process I got the following errors see below in grey since i can't post an image because I don't have a 10 reputation yet.

File system The directory sites/default/files is not writable. An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see INSTALL.txt or the online handbook.

and

Settings file The settings file is not writable. The Drupal installer requires write permissions to ./sites/default/settings.php during the installation process. If you are unsure how to grant file permissions, consult the online handbook.

Naturally I don't know what this means and was wondering what kind of problems I could expect if just ignore it, or better yet how to just resolve it and not go the route of unexpected errors later.

Any help on what this means or how it affects the install I would really appreciate.

Finally Drupal didn't ask whether an SQL database was installed and I'm not sure if that would've installed with the clone (I suspect not) but don't really know any advice on whether i should just get the SQL file from the Admin or if it is installed would be helpful.

Thank you.

1个回答

A clean Drupal installation process includes creation of required tables (you provide the db username, password, host & db-name). Drupal also needs write permission on sites/default/files directory (It stores user uploaded stuff & cache related files).

You can know more about securing file permissions here: https://drupal.org/node/244924

For a local install what I do is, give 777 permission to sites/default directory. Later I change the permission of the settings.php file to 555 to get get rid of drupal warning messages.

For *nix machines, you can do chmod -R 777 sites/default
NOTE: this is just a quickfix and okay for local setup. Please set file permissions wisely in production/server setup.

doubairan4213
doubairan4213 我会把777放在#$ conf ['proxy_server'] ='';
6 年多之前 回复
dou2347
dou2347 几乎整个settings.php文件都被注释掉了,这是故意的吗? 如果是这样,我需要取消注释这一部分#$ conf ['proxy_server'] =''; #$ conf ['proxy_port'] = 8080; #$ conf ['proxy_username'] =''; #$ conf ['proxy_password'] =''; #$ conf ['proxy_user_agent'] =''; #$ conf ['proxy_exceptions'] = array('127.0.0.1','localhost');
6 年多之前 回复
douke9545
douke9545 谢谢Amar,但是我无法查看它对我不起作用的链接。 但是在设置文件中你会包含777权限,它会是什么样子?
6 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐