anon40457's avatar

Laravel permissions on IIS server

I built a laravel app for a client but he wants to host it on his own server which is a Windows Server 2008. I followed all the tutorials I found on google and here, but I am stuck on storage folder’s permission

I gave full control on IIS_IUSERS user name for the storage folder, but I still have an error of permission denied when I try to open the default laravel installation.

''' The stream or file "C:\inetpub\wwwroot\laravel\storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied '''

The IIS has this tree

-Start Page - --Application Pools --Sites ---Default Web Site ---aspnet_client ---laravel

To make it clear, I don't work with Windows Server at all and whatever I do is with Google. Any idea?

0 likes
1 reply
ArminLinder's avatar

On current Windows versions, the IIS_USERS group is empty per default, and thus doesn't permit anyone anything. it's just kind of a template.

If you manually add the built-in IUSR (formerly named IUSR_[computer name]) account to that group, your storage folder should start working.

Alternatively grant the "everyone" group "change" access on the storage folder + subfolders, this will effectively turn off all NTFS security.

Here you can read how Microsoft thinks everyone should organize security on IIS:

https://docs.microsoft.com/en-us/iis/get-started/planning-for-security/understanding-built-in-user-and-group-accounts-in-iis

Armin.

1 like

Please or to participate in this conversation.