I am trying to get this module functioning properly, but cannot seem to determine what file permissions I am supposed to provide on the files/private directory.

I have tried all of the following without success:
=====
513 chmod 775 private/
519 chmod 700 private
528 chmod 000 private
529 chmod 400 private
530 chmod 440 private
531 chmod 640 private
532 chmod 740 private
533 chmod 644 private
535 chmod 650 private
536 chmod 633 private
538 chmod 666 private
539 chmod 670 private

I am able to get most other warning to silence (with say perm 666 for instance) but then cannot seem to get the following warnings to go away.:
=====
* The selected file /tmp/filecGPgUi could not be copied.
* The selected file /tmp/fileZOHWck could not be copied.

I read through the code and didn't see any references to file permissions in there either. Please let me know what I'm missing. I'm anxious to try out this module. Sounds like it may be very useful for my situation.

Cheers,
-Chris

Comments

starbow’s picture

The system should set the correct permissions for you. Try deleting the private directory, and then going to admin/setting/private_upload, and resubmit the form.

wheelercreek’s picture

I'm getting the same issue. I changed ownership of the files & temp files to apache (to match the private dir). Then it gave me errors about PHP safe mode restrictions in effect. So I turned off php safe mode, changed the ownerships back, (thinking safe mode was the problem all along)..

Now it's able to copy the test files in fine. But I'm getting the fsocketopen warning- unable to test the file access.

wheelercreek’s picture

Version: 5.x-1.0-beta6 » 6.x-1.x-dev

Sorry - I should mention this is with Drupal 6.4 - just upgraded!

Khromedys’s picture

Version: 6.x-1.x-dev » 5.x-1.0-rc2
Priority: Normal » Critical

Hello,

Sorry I posted in the wrong "room", my Drupal's version is 5.10.

I've tried twice to delete and then resubmit the form. Each time I have that :

* Public File Folder: 'files'
* Private File Folder: 'files/private'
* files/private exists and is writable. Great.
* You have an .htaccess file in private folder. Great.
* Very bad! Your private files are not private!
* File download method is set to public. Great.
* There are no old-style private files hanging around. Great.
* There are '0' files in the private folder, and the DB thinks there are '0' private files. Great.
* There are no public files attached to private nodes. Great.
* Uploaded files in db: '1' files attached to '1' nodes.

I use a Debian and mysql.
Perhaps something wrong in my apache2 config/virtualhost ?

starbow’s picture

Hi Khromedys, you should add a new issue for this.
It is possible that your apache is configured to ignore .htaccess files. If you have access to your httpd.conf file, just make the private directory inaccessible from there (you can see how by looking at the .htaccess file).

Khromedys’s picture

Thanks. The AllowOverride option was set to None. Now it is ok.
But how could I turn /files directory to private too? I tried to put nothing in the "Private Upload Path" field. But I got one more time :
* Very bad! Your private files are not private!

starbow’s picture

Priority: Critical » Normal

If you want your entire /files directory to be private, just set you entire site to be private. You don't need to use this module.

starbow’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.