unexpected path generated at linux.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 anno tempo fa
At Linux, we facing some unexpected file are generating.  Can anyone please help me to know why it is happening?
https://prnt.sc/wT6QDJO2toq6


1 anno tempo fa
It seems you've migrated from Windows. In appsettings.json location of the WebOptimizer cache is represented as an absolute path to the wwwroot/bundle directory. You can change it directly in the WebOptimizer section of the json file.
1 anno tempo fa
alexey.a wrote:
It seems you've migrated from Windows. In appsettings.json location of the WebOptimizer cache is represented as an absolute path to the wwwroot/bundle directory. You can change it directly in the WebOptimizer section of the json file.


  "WebOptimizer": {
    "EnableJavaScriptBundling": true,
    "EnableCssBundling": true,
    "JavaScriptBundleSuffix": ".scripts",
    "CssBundleSuffix": ".styles",
    "EnableCaching": true,
    "EnableMemoryCache": true,
    "EnableDiskCache": true,
    "EnableTagHelperBundling": false,
    "CdnUrl": "",
    "CacheDirectory": "var/www/othoba/wwwroot/bundles",
    "AllowEmptyBundle": true,
    "HttpsCompression": 2
  }
This is the path of the linux but do not know why it is create the var folder and making bundle there.
1 anno tempo fa
alexey.a wrote:
It seems you've migrated from Windows. In appsettings.json location of the WebOptimizer cache is represented as an absolute path to the wwwroot/bundle directory. You can change it directly in the WebOptimizer section of the json file.


The issue was related to permission. For linx (Ubuntu) I have to give permission properly to the individual folders.
1. sudo chown -R www-data:www-data /var/www/mywebsit/wwwroot
2. sudo chown -R www-data:www-data /var/www/mywebsit/wwwroot/bundles
3. sudo chown -R www-data:www-data /var/www/mywebsit/wwwroot/css
4. sudo chown -R www-data:www-data /var/www/mywebsit/wwwroot/js
1 anno tempo fa
I have had a similar problem with Linux/Debian. My son helped me with it, and he could probably explain the resolution better as I am restating it here in this reply merely from memory. He's a Linux nerd. Linux is new to me.

The error came up as a warning in the nopCommerce Admin panel that the www-data user didn't have some sort of permission(s), so, without consulting with my son because I thought it was a permissions error, I gave the www-data user permission to the nopCommerce folder. That granting of permission threw an error in the code and stopped the nopCommerce software from showing the store at all. It was a 502 error or a 503 error if I remember correctly.

Upon further inspection, we noticed that datasettings.json was now recognized as an empty file giving a null value to the code, so we deleted the file, and the warning went away. The store came back on localhost as it had before, except, the warning was no more.

The software wanted to overwrite appsettings.json with a connection string other than what we had set. I made a copy of the prior appsettings.json as appsettingskeep.json (to save as a copy of appsettings.json), while rewriting the textual connection string in the original appsettings.json file. Each time, the appsettings.json would be rewritten with a connection string pointing to a MSSQL database instead of one for Linux.

So my son had noticed that the datasettings.json file held an empty value for its size, and, upon looking at its contents, it had no contents, which prompted him to delete the file to see how the nopCommerce software would react.

It worked! :)

Deleting datasettings.json corrected the error.

If I didn't explain that correctly, I will get my son to do it again for y'all.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.