Hello, I have just installed the latest version of Drupal and get the following error whenever I go into 'settings' in the menu or try to configure a theme: 'The directory files does not exist.'The directory files does not exist'

at the top of the page there is the following error message:
warning: mkdir() failed (Permission denied) in /web/sites/xx/xxx/www.xxxxx.com/includes/file.inc on line 77

I cant find any information about which file permossions to set and my site is on a shared server. Any ideas? thanks, kenny

Comments

Lineman-at-lineman.net’s picture

In your drupal root, you'll need to create a directory called "files" and CHMOD it to 777.

kennysto’s picture

great, thanks. Urm why isnt this file included in the installation?

Lineman-at-lineman.net’s picture

I've wondered that myself. It's never been in any of them.

I'm guessing because you'd have to change the permissions anyway. With just about any CMS, that seems to be a common install issue.

kennysto’s picture

oh i see. they could have had least mentioned it in the installation guidelines. i searched the support but didnt find any info, i coant believe i am the only one to have come across this. ah well, works now. thanks again.

sepeck’s picture

Submit a patch against the Drupal readme.txt file for installation. In addition to having to change the permissions yourself, it is posible that the permissions settings are different than chgmod 777 on a Windows IIS server.

-sp

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

kennysto’s picture

Submit a patch against the Drupal readme.txt file for installation

sorry you lost me there

sepeck’s picture

You found what you believe to be a problem with the Drupal install.txt document. You can file a bug report detailing what you think the fix is and (if you now how) you can also submit a patch against the install.txt document to correct this percieved issue. (I'm being general here, it probably nees to be addressed)

So from here: http://drupal.org/node/316
go to here: http://drupal.org/node/317
and follow the instructions. If it is filed as a bug report then it is more likely to be addressed or at least responded to.

Before you do that, you could go here: http://drupal.org/project/issues and glance through the issues (Project would be Drupal) to see if anyone has already submitted it. If so, then you could see the status and/or add you comments to it.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

kennysto’s picture

oh i see. funny its not mentioned in the installation guidelines. i searched support but didnt find any info, i cant believe i am the only one to have come across this. ah well, works now. thanks again.

NeilMcEvoy’s picture

Hi folks

I have the same problem but I'm afraid I don't know what CHMOD means. I use one of the Drupal recommended hosting providers, so should I just send them an email and ask them to implement your recommendation?

Many thanks,

Neil.

heather’s picture

In your FTP program, you have to create the directory 'files', then right-click (or CTRL click in Mac) on it, and look for an option that says either 'CHMOD' or 'set permissions'. Usually a box will come up with checkboxes. You must tick all of them until it give read/write/execute to all the users (owner/group/everyone) listed. This will equal 777.

JeremyZimmer’s picture

wouldn't chmodding my 'files' directory to 777 be a security hazard, especially in a shared hosting environment?

is there a workaround or module that moves user file storage to the database? this seems like it would be a more secure option...

Lineman-at-lineman.net’s picture

In your drupal root, you'll need to create a directory called "files" and CHMOD it to 777.

carlmcdade’s picture

You want to do this yourself rather than have a PHP install script do it. Because not all PHP installations are the same some run PHP as Apache orwner and so you get something stupid like owner:nobody and group:99 which means that you will not be able to manipulate the created folders via FTP. If you are lucky then you can do it by using PHP exclusively but then an upgrade of PHP might change the ownership group and leave you hanging with out any permissions again.

The best way is for the install script to use FTP sockets to create and set permisions on the folders. Just a tip for those of you writing PHP Drupal installation scripts.
---------------------------
info for Drupal installation
__________________________
Carl McDade
Information Technology Consult
Team Macromedia
www.hivemindz.com