Windows 11 folder read & write permissions don't work

Sven Boets 6 Reputation points
2022-01-16T14:47:09.93+00:00

I have on my new device Windows 11 and i installed XAMPP so i can run my localhost for PHP and MySQL.
When i use mPDF , it needs to write temp files in a folder (C:\xampp\htdocs\invoice\vendor\mpdf\mpdf\tmp).
And then i get 'Fatal error: Uncaught Mpdf\MpdfException: Temporary files directory "C:\xampp\htdocs\invoice\vendor\mpdf\mpdf\src\Config/../../tmp" is not writable in'.
in Windows 11 i then checked the permissions and i changed my personel settings to full so read and write should be posible.
when i test it stil nothing. the PHP files work correct , on a Windows 10 device and online this works all fine. only on my local W11 this is a problem.
To be shure i made a PHP to check if folder exists , to list up whats in it and if thats ok if i have write permission and everything is ok exept the permissions.

is anyone having a simular problem? or is there something i'm missing here?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,104 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,341 Reputation points
    2022-01-24T09:02:32.15+00:00

    Hi SvenBoets-5541,

    Thank you for your question and for getting in touch. My name is Samuel and I would be more than happy to help you with your query.

    3 possible methods you can try to fix this:

    Method 1: Allow full control

    1) Right click on the folder that is having trouble saving files and go to Properties

    2) On the Security tab, click Edit to change the permissions

    3) Select the admin user in the Group or User Names section

    4) Put a checkmark on Allow full control

    5) Allow full control to other users and accounts on PC as well and Click Apply and then OK

    Method 2: Change Permissions

    1) Right click on the folder and go to the Properties window

    2) Navigate to the Security tab and click on Advanced

    3) In the Owner section, click Change

    4) Click Advanced > Find Now > Find your username in the search results > OK

    5) Click OK again for the selected username

    6) Check the Replace owner on subcontainers and objects box > Apply > Yes > OK

    7) Click OK in the advanced security settings windows

    8) Click Advanced again > Change Permissions > Enable Inheritance, To add a new object click Select a parent and follow steps 5 and 6

    9) Go to Show advanced permissions to enable more permissions > OK

    Method 3: Disable User Account Control

    1) Search and open Change User Account Control Settings in Windows search box

    2) On the left side, move the slider to Never notify and click OK

    An extra suggestion is to check your installed antivirus, because sometimes some antivirus block certain settings within Windows.


    If the answer is helpful, please upvote and accept it as an answer.

    2 people found this answer helpful.
    0 comments No comments

  2. Smashy 1 Reputation point
    2022-08-07T19:46:30.487+00:00

    @Limitless Technology Your answer worked for me. Thank you!

    0 comments No comments