I have tried a lot of different combinations of filemanager settings and directory structures, but all I ever get is when I hit "Add" is:

* File copy failed: no directory configured, or it could not be accessed.
* Error saving upload to filestore.

There are comments on other issues, such as "use absolute paths", and "put the private folder inside the public folder" and "build the working/0 and active/0 directories by hand". I have tried them all, same result:

The working and working/0 directories are created in the pubilic folder. A filemanager.lck file is created in the private folder. And that it is all.

I am working on a FreeBSD system, with PHP4.4.1. Safe mode is off.

Comments

gte451f’s picture

I am having similar troubles.
I too have a set of folders created when trying to upload a file.

public_files/working/0
private_files/filemanager.lck

Same error messages as you are getting.

Lamp stack
apache 2.x
php 5.0.4
mysql 4.x

gte451f’s picture

After some editing I came to the following conclusions regarding filemanager and by extenstion attachement.

Don't use absolute paths with filemanager it messes up the links created to uploaded files.

Filemanager's public files field must be inside the configured admin/settings->File System Path field
Filemanager's private files field must be inside filemanagers public files field.

Here is my working example:
admin/settings->Files System Path:
files <- the relative directory inside your drupal install
Filemanager public folder:
files/filemanager
Filemanger prive folder:
files/filemanager/private

For security I have set my main admin/settings->File System Path directory to have apache as owner and disable public and group reade/write/exectute access (0740 or rwxr-----)

Still, I had such high hopes for store all my files (images, attachements, uploads) outside my web directory somthing like /home/userx/drupal_files but this dosen't seem to be possible.

maybe the limited priviledges will be enough.
Also I wonder how this looks in a multisite configuration?

gte451f’s picture

After some editing I came to the following conclusions regarding filemanager and by extenstion attachement.

Don't use absolute paths with filemanager it messes up the links created to uploaded files.

Filemanager's public files field must be inside the configured admin/settings->File System Path field
Filemanager's private files field must be inside filemanagers public files field.

Here is my working example:
admin/settings--Files System Path:
files --- the relative directory inside your drupal install
Filemanager public folder:
files/filemanager
Filemanger prive folder:
files/filemanager/private

For security I have set my main admin/settings->File System Path directory to have apache as owner and disable public and group reade/write/exectute access (0740 or rwxr-----)

Still, I had such high hopes for store all my files (images, attachements, uploads) outside my web directory somthing like /home/userx/drupal_files but this dosen't seem to be possible.

maybe the limited priviledges will be enough.
Also I wonder how this looks in a multisite configuration?

starbow’s picture

I don't believe that this is a filemanager issue. I have used my settings with AcidFree, which also uses the Filemanager API, and it works fine with absolute paths outside of the drupal directory. That is why I put this issue here & not on the filemanager module.

hyperlogos’s picture

I believe it IS a filemanager-RELATED issue anyway. I changed no acidfree settings, but I changed filemanager settings as described above and bingo! acidfree's working.

starbow’s picture

Priority: Normal » Minor
Status: Active » Closed (fixed)

Just to follow up: The real issue is that Drupal's file handling (file.inc), silently prevents any module from saving files outside of the file or temp directories defined in the main admin settings page. So the real issue is that the FileHandler module needs to test and make sure that both it's public and private directories are under one of those directories (or actually test writing & reading a file).