4

I have TexLive on Windows 10 installed. For some reason, it can only write to files in certain folders, and not others.
I am using the command: pdflatex sample2e.tex
This uses a sample document that comes with TexLive for testing. The file can be found here: http://www.wikiupload.com/UFRD0WK19701I6J

I get the following output in these folders (i.e. it works): C:\Users\josh_,C:\Users\josh_\testing, C:\testing

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(c:/texlive/2016/texmf-dist/tex/latex/base/sample2e.tex
LaTeX2e <2017-04-15>
Babel <3.13> and hyphenation patterns for 84 language(s) loaded.
(c:/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/texlive/2016/texmf-dist/tex/latex/base/size10.clo)) (./sample2e.aux)
(c:/texlive/2016/texmf-dist/tex/latex/base/omscmr.fd) [1{c:/texlive/2016/texmf-
var/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] (./sample2e.aux) )<c:/texlive/
2016/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb><c:/texlive/2016/texm
f-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb><c:/texlive/2016/texmf-dist/fo
nts/type1/public/amsfonts/cm/cmmi10.pfb><c:/texlive/2016/texmf-dist/fonts/type1
/public/amsfonts/cm/cmmi7.pfb><c:/texlive/2016/texmf-dist/fonts/type1/public/am
sfonts/cm/cmr10.pfb><c:/texlive/2016/texmf-dist/fonts/type1/public/amsfonts/cm/
cmr12.pfb><c:/texlive/2016/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb>
<c:/texlive/2016/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb><c:/texlive
/2016/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb><c:/texlive/2016/texmf
-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb><c:/texlive/2016/texmf-dist/fonts
/type1/public/amsfonts/cm/cmsy10.pfb><c:/texlive/2016/texmf-dist/fonts/type1/pu
blic/amsfonts/cm/cmsy7.pfb><c:/texlive/2016/texmf-dist/fonts/type1/public/amsfo
nts/cm/cmti10.pfb>
Output written on sample2e.pdf (3 pages, 136743 bytes).
Transcript written on sample2e.log.

However, I get the following output in these folders (i.e. it doesn't work): C:\Users\josh_\Documents\tester, C:\Users\josh_\Documents, C:\Users\josh_\Dropbox, C:\Users\josh_\Dropbox\tester, C:\Users\josh_\Desktop, C:\Users\josh_\Desktop\testing

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
! I can't write on file `sample2e.log'.
(Press Enter to retry, or Control-Z to exit; default file extension is `.log')
Please type another transcript file name:

Can you tell me what is going on and how to fix it?

I particularly want to work in my Dropbox folders.

Thanks

18
  • 1
    Added the file. Yes, I can write to the folders where I get the error message. I am the sole administrator and I only have one account on the computer. I can't get rid of the _. Windows, in all its wisdom, gave "josh_" as the folder name when I first set up the computer. It is rather ridiculous. To clarify, I first cd into the folder and then run the command. Sep 26, 2017 at 21:32
  • is there an existing sample2e.log there? Sep 26, 2017 at 23:08
  • 1
    @DavidCarlisle Isn't there a known issue with Dropbox?
    – cfr
    Sep 26, 2017 at 23:35
  • @cfr perhaps: tex.stackexchange.com/questions/336541/… Sep 26, 2017 at 23:38
  • 2
    TeXlive doesn't update/upgrade a 2016 to 2017. I have both and they are in parallel folder. Perhaps you installed the 2017 over the 2016. That's curious but I doubt that is the reason of the blocked folders. Do you have some antivirus or firewall system or something like that tries to protect the folders? Sep 27, 2017 at 18:09

2 Answers 2

7

My antivirus/firewall program Bitdefender Total Security 2018 has the above "failed" folders protected. Upon opening the program it gave notifications that it had blocked pdflatex from writing to certain protected folders.

I then told Bitdefender to allow pdflatex to write to protected folders by doing the following:
1. Open Bitdefender.
2. Go to the main screen (icon is a "B" inside a shield).
3. Click on View Features.
4. Click on Application Access in the Safe Files box at the bottom right of the interface.
5. The blocked program(s) will be listed as "blocked". Click the toggle switch to set them to "allowed".

After this, pdflatex could write to the "failed" folders listed above.

Thanks to everyone for your help! A big thank you to Ulrike Fischer for the key insight of looking for a program that is protecting the folders!

1

I just bought a laptop with Windows 10 and installed TeXlive.2021.

errors:

  • cannot run texhash.exe from icon nor batch file

    • solution: navigate to C:...\texlive\2021\bin\win32 select texhash.exe, run as Administrator

alternate: edit the various files C:/.../texlive/texmf-local/ls-R to write. C:/.../texlive/2021/texmf-config/ls-R to write. C:/.../texlive/2021/texmf-var/ls-R to write. C:/.../texlive/2021/texmf-dist/ls-R to write.

  • cannot write .log

solution: turn on access to controlled folders:

https://support.microsoft.com/en-us/windows/allow-an-app-to-access-controlled-folders-b5b6627a-b008-2ca2-7931-7e51e912b034

Controlled folder access in Windows Security reviews the apps that can make changes to files in protected folders and blocks unauthorized or unsafe apps from accessing or changing files in those folders.

Select Start

Settings Update & Security > Windows Security > Virus & threat protection.

Under Virus & threat protection settings, select Manage settings.

Under Controlled folder access, select Manage Controlled folder access.

Switch the Controlled folder access setting to On or Off.

Ron Fehd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.