Reputation: 1
I am trying to install nopcommerce on Microsoft Azure cloud with Ubuntu 22.04.
First I installed the hestiacp control panel and configured dotnetcore templates from https://github.com/gabatronic/hestia-netcore. Secondly, hosted a sample application and it executed successfully, then I downloaded nopcommerce 4.60.3 nosource for Linux and extracted to the configured folder and configured a service as per nopcommerce documentation to start with dotnet Nop.Web.dll.
When I try to use the site through browser, an UnauthorizedAccessException is occured.
The exception reads as
IOException: Permission deniedUnknown location
UnauthorizedAccessException: Access to the path '/home/test/web/store/netcoreapp/App_Data/DataProtectionKeys/key-acc685fa-d997-4794-9290-438a3e5c3e8d.xml' is denied.
Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, string path, bool isDirError)
CryptographicException: An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information. For more information go to http://aka.ms/dataprotectionwarning
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(byte[] plaintext)
If anyone has experience of installing nopcommerce on Linux, please help me with my queries.
1. Which of the folders needs write permission?
2. Which permission needs to be set to the nopcommerce folder and its files. Presently, I set azureuser:www-data, but it throws the above exception.
Upvotes: 0
Views: 81
Reputation: 1
Setting the below permissions to the hosted folder solved my problem.
sudo chmod -R 755 /var/www/html
sudo chown -R www-data:www-data /var/www/html
I found the solution from https://www.cloudbooklet.com/install-nopcommerce-on-ubuntu-20-04-mysql-nginx-ssl/
Upvotes: 0