cancel
Showing results for 
Search instead for 
Did you mean: 

fopen() permission denied in Magento 2.30 Windows XAMP

fopen() permission denied in Magento 2.30 Windows XAMP

I am getting the below error while reading files using fopen() command.

 

Warning: fopen(C:/xampp/htdocs/magento/var/log): failed to open stream: Permission denied in C:\xampp\htdocs\magento\app\code\Reddot\Rapi\Controller\Rapi\Email.php on line 37

 

I am using Magento 2.3.0 in windows 10 using XAMP. Do i need to give any specific commands to get permission?

4 REPLIES 4

Re: fopen() permission denied in Magento 2.30 Windows XAMP

@ansif_ibrahimkutty ,

 

you need to have write permission for following folders 

  1. /var
  2. /generated
  3. /pub/media
  4. /pub/static 

you can update the permission in Windows by following : 

  1. go to folder Properties & goto Security tab :: Advanced
  2. Permissions tab, Click on Change Permissions
  3. Click :Add:  :: -> Advanced 
  4. Find Now, & click on user "Everyone", 
  5. Click OK
  6. For "Everyone"  Select "Read Write & execute" permissions 
  7. Select "Replace all child object permissions with inheritable permissions from this object"
  8. Click OK. 

you are now all set Smiley Happy 

 

kindly Accept as a Solution if this works for you and give Kudos. 

Re: fopen() permission denied in Magento 2.30 Windows XAMP

Sorry for the late reply. I tried all the above steps but initially it didnt worked, but after couple of days of testing and some BIOS setup things are working now. Anyway thanks for the above suggestion.

Re: fopen() permission denied in Magento 2.30 Windows XAMP

Keep in mind that while this can fix permission issues, it may not be the most secure configuration. It's important to configure permissions according to how to fix your specific needs while ensuring security.

 

Re: fopen() permission denied in Magento 2.30 Windows XAMP

If you have any questions related to FIFA 2024 or need more specific guidance on Magento permissions.