R Markdown publishing error

Does anyone know how to rectify this error code?. I got this while i was trying to publish an R Markdown file onto Rpubs:

Error in file(file, if (append) "a" else "w") : 
  cannot open the connection
Calls: <Anonymous> -> write.dcf -> file
In addition: Warning messages:
1: In dir.create(accountDir, recursive = TRUE) :
  cannot create dir 'D:\', reason 'Permission denied'
2: In file(file, if (append) "a" else "w") :
  cannot open file 'D://rsconnect/documents/html.Rmd/rpubs.com/rpubs/Document.dcf': No such file or directory
Execution halted

My RMarkdown file looks like this:

title: "R Markdown Test."
author: "Joel Jr Rudinas"
date: "July 10, 2018"
  html_document: default
  word_document: default
  pdf_document: default

This is a first try at creating an RMarkdown Document. 

Let us load some data


Let us look at the head of the data 

Here is a pairs plot of the data

Here is a regression model of ozone predictors.

fit <- lm(Ozone ~ Solar.R + Wind + Temp, data = airquality)

What is your working directory, and what is the directory in which your project is located?

HI, I had the same issue. I registered R pub in C drive. When I used R Pub in E drive, it gave me the error. Once I moved R markdown file into C Drive, then the R pub works again.