401.3 Errors with published PDF content in FC 7.4 and ACF 2021

Hello, when we add a PDF via the FarCry admin running under ACF 2018, everything works fine. We are testing a switch over to 2021 however, and we have found that published PDFs generate a “HTTP Error 401.3 - Unauthorized” error when we try to view them.

Note that the PDF content gets created fine, the PDF itself is uploaded and stored correctly, and we can preview the PDF when it is in draft mode! But once we publish it, we can no longer see it or preview it. Returning it to draft mode will let us preview it again; publishing it again prevents it.

Note that in 2021, we can preview/view all content created prior to the switch to 2021. However, PDF content created under 2021 will exhibit this same behavior even if we switch the site to run under 2018.

Any clues? Permissions on the directories all seem fine, and I have added these to the classpath in the 2021 admin:


Note also that this is in Windows, IIS 8.5. Thanks for reading!

Windows retains file permissions when a file moves. In this case, when you upload the PDF, it is first placed into CF’s temporary directory and then moved to the destination. So, if you do not have the correct permissions on the CF temp directory, when the file is moved it will still have those permissions. I ran into this recently as well. So, just make sure the permissions are correct in the CF temp directory and you should be good to go. You can get this by running getTempDirectory() if you’re unsure where it is.

Thanks a lot Sean, this did the trick! There were some differences in the permissions of that temp directory between our 2018 instance and 2021 instance. After matching them up, everything is working as expected.

I appreciate your help!