### Bug description

I have a template where many files and resources needs to be added for correct pdf output. I opted to include some logos in the folder logos, which makes my _extension.yml look like this:

````
title: template
author: Simon Lidberg
version: 0.0.1
contributes:
  format:
    common:
      number-sections: true
      toc: true
      reference-section-title: References
      his-metadata:
        sammanfattning: "Abstract in swedish"
        publicationtype: dissertation
        printshop: "Stema Specialtryck AB, Borås"
        isbn: 123-12-123456-X-X
        seriesnumber: XX
    pdf:
      documentclass: his-thesis
      classoption: english
      biblio-config: false
      cite-method: biblatex
      suppress-bibliography: true
      link-citations: true
      colorlinks: false
      template: his-template.tex
      template-partials: 
        - "partials/doc-class.tex"
        - "partials/_metadata.tex"
        - "partials/title.tex"
        - "partials/before-body.tex"
        - "partials/after-body.tex"
      format-resources:
        - his-thesis.cls
        - hismetadata.sty
        - hisbibliography.sty
        - histextformatting.sty
        - hisownpublications.sty
        - hisfont.sty
        - hiscover.sty
        - histitlepage.sty
        - logos/
      pdf-engine: lualatex
      latex-min-runs: 3
      has-frontmatter: true
      papersize:
      lof: true
      lot: true
      english: true
    html:
      theme: cosmo
````

But when the 'logos' folder is copied into the input folder, it retains the same permissions as regular files (555). This makes it impossible to remove in subsequent runs of quarto render. Directories would need to be (755) in order for them to be removed properly.

Here's the repo [https://github.com/verbalins/his-template](https://github.com/verbalins/his-template), sorry for the state it's in currently...

Debug information:
````
[✓] Checking Quarto installation......OK
      Version: 1.1.132
      Path: /opt/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.6
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.2.1
      Path: /usr/lib64/R
      LibPaths:
        - /home/verbalins/R/x86_64-pc-linux-gnu-library/4.2
        - /usr/lib/R/library
      rmarkdown: 2.14

[✓] Checking Knitr engine render......OK
````
Output showing the error:
````
[1/3] index.qmd
[2/3] intro.qmd
[3/3] summary.qmd

pandoc 
  to: latex
  output-file: index.tex
  template: _extensions/his/his-template.tex
  standalone: true
  toc: true
  number-sections: true
  top-level-division: chapter
  pdf-engine: lualatex
  variables:
    graphics: true
    tables: true
  default-image-extension: pdf
  cite-method: biblatex
  
metadata
  crossref:
    chapters: true
  documentclass: his-thesis
  papersize: null
  block-headings: true
  reference-section-title: References
  his-metadata:
    sammanfattning: Abstract in swedish
    publicationtype: licentiate
    printshop: 'Stema Specialtryck AB, Borås'
    isbn: 123-12-123456-X-X
    seriesnumber: XX
    coverimage: foto.jpg
    coverphoto: face.jpg
    fullarticles: |
      \fullarticle[scale=.9,trim={0mm 5mm 0mm 5mm},pages=-]{fischer2017doctoraldissertationmanual}{style-guide/manual.pdf}[\href{https://creativecommons.org/licenses/by-nc-nd/4.0/}{\ccbyncnd}]
      \fullarticle[scale=.9,trim={0mm 5mm 0mm 5mm},pages=1]{fischer2017doctoraldissertationmanual}{style-guide/manual.pdf}[\copyright{} 2018 University of Skövde. Reprinted, with permission, from]
      \fullarticle[scale=.9,trim={0mm 5mm 0mm 5mm},pages=1]{fischer2017doctoraldissertationmanual}{style-guide/manual.pdf}[Reprinted from][with permission from University of Skövde.]
    acronyms: |
      \newacronym{moo}{MOO}{Multi-Objective Optimization}
      \newacronym{sbo}{SBO}{Simulation-Based Optimization}
      \newacronym{ai}{AI}{Artificial Intelligence}
      \newacronym{doe}{DOE}{Design of Experiments}
    ownpublications: |
      \authorspublication{fischer2017doctoraldissertationmanual}
      \authorspublication[Design, manuscript preparation, review]{fischer2017doctoraldissertationmanual}
  classoption:
    - english
    - final
    - cover
  biblio-config: false
  suppress-bibliography: true
  link-citations: true
  colorlinks: false
  has-frontmatter: true
  lof: true
  lot: true
  english: true
  bibliography:
    - references.bib
  title: Title for this example thesis
  author: Author Authorsson
  date: '2022-08-23'
  abstract: Testing abstract
  
(ERROR) PermissionDenied: Permission denied (os error 13), remove '/path/to/folder/thesis/logos/laurelbranch-rubin.pdf'

````


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
dragonstyle
2022-08-26T11:02:09Z
verbalins
bug
v1.3
closed
quarto template format-resources folder not removed in linux
https://github.com/quarto-dev/quarto-cli/issues/2141