3

I had my website developed by someone else and it is currently working with no issues on our web server. I'm trying to set the same site up on my Mac OS X 10.6 using the preinstalled Apache server, MySQL, and PHP5. Also, it's Drupal 6.22 we're using. I copied all of the website files (including Drupal and the .htaccess file) and put them in /Library/WebServer/Documents/website. I then did a mysql backup on the server and imported that file on the local machine with phpMyAdmin. I configured the settings.php file and everything else to work nicely so it can connect to the DB, etc.

Most of the site works as expected, however, there is a couple of nodes that won't work at all. Instead I get this message when I go to them:

"The site is currently not available due to technical problems. Please try again later. Thank you for your understanding."

The weird part is if I enter in the URL to go to the edit page for that node it works, but I still cannot view the page.

When trying to search for problems that only issue I found anywhere is in the "Status Report" page it says the file system is not writable. I get this message:

"The directory sites/default/files is not writable."

I checked the permissions and that folder has drwxr-xr-x set for it.

Any ideas as to what might not be set properly would be greatly appreciated.

2 Answers 2

2

The files directory in your site must be writable by the webserver. In the finder, do a Get Info on the files directory and assign read & write permissions to staff. (Make sure that this applies to any directories inside files as well.) Alternatively, in the terminal you could "chmod -R 775 my-site-path/sites/default/files" to take care of files and any contained subdirectories.

5
  • No luck. I used "chgrp" to recursively make staff the group with read and write permission. I confirmed this both in the terminal and in finder using the Get Info. I also tried your "chmod" idea with no luck. Still says the files directory is not writable. Here's what the permissions look like from the terminal: drwxrwxr-x 41 myuser staff 1394 3 Aug 16:49 files
    – Mike
    Commented Aug 4, 2011 at 12:40
  • In stock Mac OS X installations, staff is the default group. Are you saying it wasn't? If not what was it before?
    – keithm
    Commented Aug 4, 2011 at 13:33
  • It was set to admin. I had been playing around with the permissions before in an attempt to get something to work. It's set to staff now, but the results are the same.
    – Mike
    Commented Aug 4, 2011 at 15:47
  • 2
    The group needs to match the group of your webserver. As an experiment (not for production use) you can temporarily chmod -R 777 files and see if that makes a difference. If so, you likely have a group mismatch.
    – keithm
    Commented Aug 4, 2011 at 15:51
  • @keithm - I am having exactly this problem running a development site on a mac. setting the permission to 777 does fix the problem. Is there a way to fix the mismatch or is it ok just live with the 777 setting given that it is not a production site? Commented May 5, 2015 at 14:49
-1

I had checked which user is running the "httpd" process. In my case it was "daemon".

sudo chown -R daemon sites/default/files/ had solved the problem (permissions: 775)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.