Files inside the CSS folder gets automatically deleted when I clear the cache When i set my uploads path to ../ on file system, my files inside the css folder get deleted when i clear the cache. My aim is to be able to upload my files on the root outside drupal installation which is possible so far except the deletion of my files. I tried deleting the content of the .htaccess file that gets created in the root folder but there's no luck.

My directory structure is:

root/

----css

-------menu.css(file that get erased)

----drupal

-------drupal installation

----js

-------javascript

----other HTML files

Thank you
What you are doing is dangerous. It opens a security hole in your installation. But that's your problem.

Drupal caches pre-combined css and js files in, respectively:


public://css
public://js


It's hardcoded, and you can do nothing about it. This means that if you will set public to mean your ../, Drupal will use ../css and ../js for CSS and JS caching purposes - all purposes even cache clear. For performance reasons Drupal does not care if it was this installation that created cache item when you tell it to clear it all. Why should it? Clear is clear after all.

Long story short: Don't set drupal's public:// to anything you don't want Drupal to manage. If you really have to, symlink specific directories, or write custom module to manage such uploads.