### Bug description

When rendering a qmd document to pdf using Rstudio's (2022.12.0 Build 353) quarto engine (v. 1.2.269) from the command line and using keep-tex, the .tex file permissions are 600, rather than the directory default. This is problematic in my usage case because I rely on group permissions. Knitting / rendering from the GUI interface makes no difference.

Linux: Ubuntu 22.04.1, texlive 2021.20220204-1, pandoc 3.0.1

**How to replicate**

Start with filename.qmd file with the following content:
```
---
format:
   pdf:
      keep-tex: true
output: 
   pdf_document:
      keep_tex: true
---

Hello
```

1. Render the file using Rmarkdown: `Rscript -e 'rmarkdown::render("filename.qmd")'`, list the file permissions
2. Do the same using quarto render, list file permissions. 

I get: 

1. 
```
-rw-rw-r--  1 user user    99 Feb 16 13:11 filename.qmd
-rw-rw-r--  1 user user  2347 Feb 16 13:21 filename.tex
-rw-rw-r--  1 user user 23111 Feb 16 13:21 filename.pdf
```

2.
 
```
-rw-rw-r--  1 user user    99 Feb 16 13:11 filename.qmd
-rw-------  1 user user  4760 Feb 16 13:25 filename.tex
-rw-rw-r--  1 user user  2702 Feb 16 13:25 filename.pdf
```

Thanks!





### 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://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) 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.
cderv
2023-02-16T11:40:58Z
ucpresearch
bug
v1.3
closed
Wrong linux permissions when rendering
https://github.com/quarto-dev/quarto-cli/issues/4380