I am not able to use the bellow line of code. On my development machine (Windows) it is working. Yes, I am developing the application on Windows and deploying on Ubuntu. The next application I won't do this.
I got the error message "access to the path /var/... is defined".
try
{
Directory.CreateDirectory(dirInfo.FullName + "/" + numDirs);
}
catch(Exception e)
{
return e.Message; // access to the path /var/... is defined
}
I am using nginx as proxy server for Kestrel. As described in the Microsoft guide
I tried to fire some permission commands randomly, as I am far from being an expert on Ubuntu but the CreateDirectory method is still generating error.
the permission commands I've tried:
sudo chown -R www-data:www-data /var/www/PROJECTDIR
sudo find /var/PROJECTDIR -type d -exec chmod 770 {} \;
sudo find /var/PROJECTDIR -type f -exec chmod 660 {} \;
I am not setting my project inside /var/www I am using something like /var/anotherdir/anotherdir, is it a issue?