0

I'm trying to publish an asp.net core application from my Windows machine to a remote virtual one running Ubuntu 16.04 server. Using Visual Studio, I select publish by FTP then fill out all the required fields (Server, User Name and Password) and click publish. It creates a .deb file remotely but terminates with a bunch of the following errors:

Publishing folder /...
Unable to add 'appsettings.Development.json' to the Web site.  Permission denied (550).
Unable to add 'appsettings.json' to the Web site.  Permission denied (550).
Unable to add 'AutoMapper.dll' to the Web site.  Permission denied (550).
Unable to add 'AutoMapper.Extensions.Microsoft.DependencyInjection.dll' to the Web site.  Permission denied (550).
Unable to add 'dotnet-aspnet-codegenerator-design.dll' to the Web site.  Permission denied (550).
Unable to add 'ProjectName.Api.deps.json' to the Web site.  Permission denied (550).
Unable to add 'ProjectName.Api.dll' to the Web site.  Permission denied (550).
Unable to add 'ProjectName.Api.pdb' to the Web site.  Permission denied (550).
Unable to add 'ProjectName.Api.runtimeconfig.json' to the Web site.  Permission denied (550).
Unable to add 'ProjectName.Core.dll' to the Web site.  Permission denied (550).
Unable to add 'ProjectName.Core.pdb' to the Web site.  Permission denied (550).
Unable to add 'ProjectName.EfSqlServerRepository.dll' to the Web site.  Permission denied (550).
Unable to add 'ProjectName.EfSqlServerRepository.pdb' to the Web site.  Permission denied (550).
Unable to add 'ProjectName.Services.dll' to the Web site.  Permission denied (550).
Unable to add 'ProjectName.Services.pdb' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer.dll' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.AspNetCore.Mvc.Versioning.dll' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.CodeAnalysis.CSharp.Workspaces.dll' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.CodeAnalysis.Workspaces.dll' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.VisualStudio.Web.CodeGeneration.Contracts.dll' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.VisualStudio.Web.CodeGeneration.Core.dll' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.VisualStudio.Web.CodeGeneration.dll' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.VisualStudio.Web.CodeGeneration.Templating.dll' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.VisualStudio.Web.CodeGeneration.Utils.dll' to the Web site.  Permission denied (550).
Unable to add 'Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll' to the Web site.  Permission denied (550).
Unable to add 'NuGet.Frameworks.dll' to the Web site.  Permission denied (550).
Unable to add 'Swashbuckle.AspNetCore.dll' to the Web site.  Permission denied (550).
Unable to add 'Swashbuckle.AspNetCore.Swagger.dll' to the Web site.  Permission denied (550).
Unable to add 'Swashbuckle.AspNetCore.SwaggerGen.dll' to the Web site.  Permission denied (550).
Unable to add 'Swashbuckle.AspNetCore.SwaggerUI.dll' to the Web site.  Permission denied (550).
Unable to add 'System.Composition.AttributedModel.dll' to the Web site.  Permission denied (550).
Unable to add 'System.Composition.Convention.dll' to the Web site.  Permission denied (550).
Unable to add 'System.Composition.Hosting.dll' to the Web site.  Permission denied (550).
Unable to add 'System.Composition.Runtime.dll' to the Web site.  Permission denied (550).
Unable to add 'System.Composition.TypedParts.dll' to the Web site.  Permission denied (550).
Unable to add 'web.config' to the Web site.  Permission denied (550).
Unable to add folder 'var' to the Web site.  Cannot create folder "var".
Publish failed. Target ftp://192.168.10.245/.

2>Build failed. Check the Output window for more details.

I can't seem to figure out what is causing the problem.

GoBear
  • 518
  • 1
  • 5
  • 19
  • Possible duplicate of [Error 550 when uploading files to server using filezilla](https://stackoverflow.com/questions/37845039/error-550-when-uploading-files-to-server-using-filezilla) – VDWWD Jan 30 '19 at 12:56
  • Or https://stackoverflow.com/questions/29825393/550-error-when-attempting-to-upload-file-via-ftp-in-c-sharp-on-remote-server – VDWWD Jan 30 '19 at 12:57
  • I don't think I understand what permission are required. – GoBear Jan 30 '19 at 13:04
  • well what actually solved my problem was https://unix.stackexchange.com/questions/82126/vsftpd-ftp-user-cannot-create-folders I had to set `write_enable` to yes like this `write_enable=yes` in my `/etc/vsftpd/vsftpd.conf` – GoBear Jan 30 '19 at 13:13
  • First your username and password must be correct. Then your account must have the correct read/write permissions. When the website is hosted on commercial servers you usually have a control panel where you can apply those permission yourself. If not you need to set the write permission to `777` – VDWWD Jan 30 '19 at 13:18

0 Answers0