Hi,

Thanks for the module.

We have been using the private files download system on a site where there are private downloads available to a uthenticated users and anonymous users can see public files only. Eg an anonymous user can see the brochures of a product (correctly uploaded to /sites/default files folder). An authenticated user needs to sign in to access the private files. Eg an authenticated user needs to sign in to access a technical guide correctly uploaded in the /system/files/ folder and in the correct sub folder controlled by the private files download module.

This works perfectly for a while and we have tested it. However after a few days those same files start showing access denied for authenticated users. It just happens automatically.

We are using the field collection module For 2 sections of files I.e one for Australia and one for New Zealand.

Anyway to check what is happening as all files look good first and then revert back.

Thanks.

Comments

Sohal Khatwani created an issue. See original summary.

zanonmark’s picture

Assigned: Sohal Khatwani » zanonmark

Hi, and thanks for your feedback.

1) What happens if, after a file becomes inaccessible, you upload another to the same directory? Is the new file visible (to authenticated users only, of course)?
2) is there any kind of system-software (i.e.: a cron job running an antivirus scan or similar) changing the permissions at file-system level?
3) Do you use any kind of cache module?

It sounds to me this is not related to PFDP, as I don't apply any kind of time-restriction mechanism. But I'm curious...

Thanks,
MZ

Sohal Khatwani’s picture

Hi MZ,

Thanks for your reply.

1. What happens if, after a file becomes inaccessible, you upload another to the same directory? Is the new file visible (to authenticated users only, of course)?

Answer - Yes, we simply delete the file and re-upload and then it works fine. For example, now I am trying to access 2 different products with technical documents in the same folder i.e. /system/files/technicaldocs/ and one is accessible by authenticated users and the other is not. Very strange.

2. No there is no cron job running or anti-virus after the upload running and changing the permissions.

3. We use the basic Drupal Cache options that come with the site.

To give you a bit more of background there is a 2 field collection groups which are geolocated using the Smart IP module to show different downloads for users. However, all NZ files are public and AU files are private.

It is a very strange one because it is being uploaded to the right directory so I am not sure why the same authenticated user is getting an access denied for the file on one product and not on another.

Any other things I could look for to diagnose the issue?

Thanks.

zanonmark’s picture

Status: Active » Closed (cannot reproduce)

Hi Sohal, and apologies for my late reply.

I'm sorry I can't help you with your problem, as I'm sure it is not related to my module but to some other.

Maybe you could try clearing the cache and disabling it for some days, to see if it works... but I never heard of such a problem anyway, even with the cache active.

Thanks,
MZ

thomaswalther’s picture

Hi,
I used private file: $settings['file_private_path'] = $app_root . '/../private';
Showed in /admin/config/media/file-system:
/hosting/v1/../private

The webroot is:
/hosting/v1/

I have Webform and a File Upload. I set the Upload to this element to private.

When I upload a PDF, the Webform submit a mail with this link:
https://DOMAIN/system/files/webform/upload_dokument/23/pdf3.pdf

But I got a browser error (ERR_INVALID_RESPONSE) and a 302-Header which redirects to:
https://DOMAIN/user/login?destination=/system/files%3Ffile%3Dwebform/upl...

I am logged in as admin, but I could not get the file.

In the FTP program, I see the file is really located in this path. .../private/webform/upload_dokument/23/pdf3.pdf

So it seems the rights are not working?