By default, when installing Drupal, a folder named "files" will be generated under the root directory. But, why mine does not have? When I go to 'admin/settings/file-system' and click save configuration, the folder named "files" is not generated. But it does not have an error, it says 'The configuration options have been saved.' How to solve this problem? In the status report, the filesystem goes fine. I am totally confusing, please help guys. Please advise.

Comments

darren oh’s picture

Status: Postponed (maintainer needs more info) » Active
nancydru’s picture

Which version of Drupal? The default changed in 6.x.

chris33’s picture

I am using Drupal 5.7....

Is there something to do with the .htaccess configuration, if yes, how and what I could add a code for that? Not sure for this.... Just let me know. Please help.

chris33’s picture

In addition, I think there is something to do the .htaccess file, attached is the .htaccess file. Just tell me where code to be enabled to work on this. Our administrator disabled some of this code for some reasons, maybe I could ask for him, but I want to be sure about this first. Thanks

Here is the .htaccess config...

# AddHandler application/x-httpd-php5 .php

<IfModule mod_rewrite.c>

#  RewriteEngine on



  # If your site can be accessed both with and without the 'www.' prefix, you

  # can use one of the following settings to redirect users to your preferred

  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:

  #

  # To redirect all users to access the site WITH the 'www.' prefix,

  # (http://example.com/... will be redirected to http://www.example.com/...)

  # adapt and uncomment the following:

  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]

  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

  #

  # To redirect all users to access the site WITHOUT the 'www.' prefix,

  # (http://www.example.com/... will be redirected to http://example.com/...)

  # uncomment and adapt the following:

  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]

  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]



  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a

  # VirtualDocumentRoot and the rewrite rules are not working properly.

  # For example if your site is at http://example.com/drupal uncomment and

  # modify the following line:

  # RewriteBase /drupal

  #

  # If your site is running in a VirtualDocumentRoot at http://example.com/,

  # uncomment the following line:

#  RewriteBase /



  # Rewrite URLs of the form 'index.php?q=x'.

#  RewriteCond %{REQUEST_FILENAME} !-f

#  RewriteCond %{REQUEST_FILENAME} !-d

#  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

</IfModule>

cameron tod’s picture

The .htaccess file posted above has no active rules - every directive is commented out with a # character.

Is this a permissions issue? Try creating the files directory manually, then set your tmp directory to files/tmp at admin/settings/file-system, and see what happens.

chris33’s picture

I done what you said above, I created manually the files directory, then set my tmp directory to files/tmp (save configuration is fine). And when I tested to upload video file, it does not appear on this folder the video file. By default, it is normally goes to this folder, right? All the uploaded files should go to this folder named "files", and I thinking of the code below that is commented and makes the problem since by default it is not commented as I compared of my new installed Drupal in my local computer.

And normally the folder named "files" has an .htaccess file inside it, it is auto-generated after installation. But this one I created manually does not have .htaccess file.

About the .htaccess on the bottom directive:

#  RewriteCond %{REQUEST_FILENAME} !-f

#  RewriteCond %{REQUEST_FILENAME} !-d

#  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

It is commented by our administrator, does this the problem? Do I need to uncomment it?

Thanks. Need your help on this..

cameron tod’s picture

Assigned: Unassigned » cameron tod
Status: Active » Closed (fixed)

Set the permissions on both folders to 777, and make sure each has an .htaccess file in its root with the text:

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

If this then works, pare down your security to something safer that still works (644 perhaps).

As for your other .htaccess file, you need to reimplement those directives. Here is an explanation of them:

RewriteCond %{REQUEST_FILENAME} !-d
If the request is for a real directory (one that exists on the server), index.php isn't served.
RewriteCond %{REQUEST_FILENAME} !-f
If the request is for a file that exists already on the server, index.php isn't served.
RewriteRule ^(.*)$ /index.php
All other requests are sent to index.php. 

In future, for general support requests, please use the support systems described at http://drupal.org/support rather than posting a bug report to the documentation team.