在os x系统中更新drupal版本和添加模块权限问题。

打开drupal,提示core要upgrade到7.19版本。

于是开始升级,参考如下:

drupal core升级必须按照版本顺序升级,不能跳过中间任何版本。步骤如下。

Instructions on how to update Drupal core with a newer version of Drupal of the same category or same base version [ ie Drupal 6/7/8]

1. Make a backup of your Drupal instance.
2. Download the latest release of your current Drupal version.
3. Extract the [tar ball or zip] Drupal package.
4. Set your site on maintenance mode
5. Delete all the files & folders inside your original Drupal instance except for /sites folder and any custom files you added elsewhere.
6. Copy all the folders and files except /sites from inside the extracted Drupal package [tar ball or zip package] into your original Drupal instance.
7. If the update release includes changes to settings.php replace old settings.php in .../sites/default/ with the new one, and edit site-specific entries (eg database name, user, and password)
8. If you modified files such as .htaccess or robots.txt re-apply those changes to the new files.
9. Login to your site as administrator or as user no 1
10. Run update.php by navigating to http://...yourdrupalsitename/update.php
11. Follow the process to update your Drupal instance
12. Disable maintenance mode

第10步开始,由于这只是安全问题引起的发布版本,最后显示no pending upgrade,但内核的确升级到7.19了。

后来我想安装新的module的时候,提示

ARNING: You are not using an encrypted connection, so your password will be sent in plain text

让我好生摸不着头脑,在网上着了一圈下来,原来是写入权限问题。OS X 的权限不允许apache服务器访问/sites/default 目录,所以drupal不能下载安装modules,即使是把modules下载到本地/sites/all/modules 安装也不允许。只有把/sites/default的读写权限赋予服务器的用户_www(apache的用户名)属于_www组。可以在/etc/apache2/httpd.conf 查看是不是_www,或www之类的。

然后查看/etc/group文件,里面是否有_www。如果有,就说明OS X系统有这个用户组,和用户。

在终端中输入

1、sudo chown _www:_www /[path]/drupal7/sites/default/ 改变default目录的所有者为_www组的_www.

2、sudo chown _www:_www /[path]/drupal7/sites/default/settings.php 改settings.php的所有者为_www组的_www

到目录下,用command +i 查看权限信息,显示 _www读写权限已经有了。再安装modules就很顺利了。

posted on 2013-01-26 03:09  rorodo  阅读(392)  评论(0)    收藏  举报