I have an ASP.NET application. Basically the delivery process is this one :
My problem is that with this process I have an Unauthorized access error when I try to open the website. It seems that the files need to have a permission set for the user "IIS_WPG".
I don't have the power to change IIS configuration so I have to manually change the permissions of each file. And each time I replace the files the permissions are removed and I need to set them again.
So I have two questions :
Therefore, to give read permission we use +r. In addition, we use +w to give write permission and +x to give execute permission. For removing these permissions, we use -r to remove read permission, -w to remove write permission and -x to remove execute permission.
You can edit a file or folder's permissions from the file manager window by right-clicking it, selecting “Properties” and clicking the “Permissions” tab in the properties window that appears. You can only use this window to change a file's permissions if your user account owns the file.
The chmod command enables you to change the permissions on a file. You must be superuser or the owner of a file or directory to change its permissions.
@Jeff Fritz Ouch... Your suggestion is the right solution but the parameters are... dangerous :).
On dev computers I'm logged as administrator and I tried your suggestion with cmd.
So, after some tests, the right command is :
cacls [full folder path] /T /E /G IIS_WPG:F
You need to run the CACLS program in windows to grant permissions to files and folders. From Nant, you can do this with the EXEC task.
Try a tag block like:
<exec program="cacls">
<arg value="*" />
<arg value="/G IIS_WPG:F" />
</exec>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With