Re: error if texmf.fndb and mpm.fndb are not writable, even if no write is occuring

Rick Pember <[email protected]>
Newsgroups gmane.comp.tex.miktex
Message-ID <[email protected]>
Paul,

Technically, you are correct. In fact our users are not directly 
accessing or using miktex at all. Our report generation tool is 
accessing the latex and pdflatex executables provide in the miktex 
distribution.  These are being directly referenced in our scripts (.bat 
and .py files). miktex itself is never invoked at all.

Our software distribution (a commercial CFD code) has included this 
report generation tool and the portable miktex distribution for a couple 
of years now. The new issue we now have is an additional requirement 
that any files in our distribution installed into Program Files (under 
Windows -- we also ship for Linux) cannot be writeable by users. The 
problem with this approach is that the  pdflatex and the latex 
executables included with miktex give errors if the files texmf.fndb and 
mpm.fndb (in miktex/data/le) are not writeable by users with non-admin 
accounts. (This was the gist of my post to the users mailing list.)

In general what I need are

1) pdflatex and latex executables

2) a sufficient set of latex packages and data files so that the .tex 
files created by our report generation tool converted into dvi and pdf 
files without error.

3) a complete software package when shipped. We use miktex's package 
manager internally but we do not want our users to be doing this. Our 
goal is not to provide a general purpose latex or to provide a package 
manager; it is to provide a report generation tool that uses miktex's 
latex and pdflatex as a back end.

4) a standalone distribution that uses only non-commercial third party 
software, at least wrt/ latex. We do not want to require our users  to 
install latex separately.

Both miktex and texlive are non-commercial and provide pdflatex and 
latex executables; either fits the bill. Outside of that, our only other 
option is to get a hold of open source source code for latex and build 
it ourselves.

We made a choice a few years ago to use the miktex approach on Windows 
and this is where we are. If the current problem ends up being a show 
stopper, we may switch to texlive. This is what we use under linux.

 > I doubt that you are the latex author.

Absolutely correct. We use latex, we don't write it.

Rick

On 04/24/2013 11:49 AM, Thompson,Paul wrote:
> Rick:
>
> There is a difference between miktex (a packaging tool) and TeX/latex (a software system for markup document composition). You probably actually want to say "We include TeX tools".
>
> miktex is a way of getting TeX/latex to folks. In your case, the entire thing may not be necessary. You may need to provide a small portion of TeX/latex, which does not actually need miktex and the other components. You probably just need 10 files put into an accessible location. From your comment, I doubt that you are the latex author.
>
>
>
> -----Original Message-----
> From: Rick Pember [mailto:[email protected]]
> Sent: Wednesday, April 24, 2013 1:37 PM
> To: [email protected]
> Subject: Re: [miktex] error if texmf.fndb and mpm.fndb are not writable, even if no write is occuring
>
>> Imho this sort of installation doesn't make sense.
> What I described is not actually what we're doing. I was trying to give a simpler situation.
>
> Here is  the complete story:
>
> We include the portable version of miktex in our software distribution because we have a report generation tool that uses miktex as a back end.
> Our users don't actually use miktex directly. The report generation tool is command line only. The miktex executables that we use are accessed by our report generation tool and are used in "batchmode". (BTW, we include copyright notices, etc., for miktex in the distribution.)
>
> What we did is this.
>
> 1) we downloaded the portable version of miktex and installed it.
>
> 2) we ran the portable version on a tex file that downloads all the packages to which our users need access for the report generation tool.
>
> 3) we then include the miktex directory in our distribution. Our report generation tool (python) executes the miktex executables it needs to.
> Because we're using the portable version, no miktex initialization or Windows registry access is needed.
>
> This actually works except for one small feature: miktex's pdflatex and latex need the files texmf.fndb and mpm.fndb (in miktex/data/le)  to be writeable by users, specifically, users with non-admin accounts. If we make these two files writeable, this approach works without any problems.
>
> (If they aren't writeable, errors like "pdflatex: Windows API error 5:
> Access is denied" occur.)
>
> The issue with this approach is that our customers are typically installing our software, including the miktex directory, in Program Files.  Some of our customers have a security requirement that no file in Program Files can be writeable by users. Also, these are often multiuser environments.
>
> It does seem from the tests I ran that texmf.fndb and mpm.fndb do not need to be writeable if all the packages needed are already installed.
> Specifically, if all the packages are already available, pdflatex and latex do not change the contents or the time stamps of texmf.fndb and mpm.fndb.
>
> I see that my real question is: is there some way to configure the portable version miktex so that write access to texmf.fndb and mpm.fndb is not needed.
>
> On 04/24/2013 12:19 AM, Ulrike Fischer wrote:
>> Am Tue, 23 Apr 2013 15:20:45 -0700 schrieb Rick Pember:
>>
>>>    > I think you should give more informations
>>>    > regarding the accounts and > the installation.
>>>
>>> Here's what I did in detail:
>>>
>>> 1) create restricted user account "user1" and log in to that account.
>>> (restricted = non-administrator)
>>>
>>> 2) download miktex Portable 2.9.4757 to desktop
>>> -- we're using the portable package because we want to create a
>>> portable folder containing miktexwhich we can then give to our
>>> customers and which they can then use in a restricted account
>>>
>>> 3) create a folder miktex and move installer into it
>>>
>>> 4) open folder miktex and double click extractor.
>>> -- extract to C:\Documents and Settings\user1\Desktop\miktex
>>> --twoofthefilestheextractorinstallsare
>> ....
>>> 9) Now right click texmf.fndb and mpm.fndb again and click "Deny" on
>>> Write access for user1.
>>>
>>> Recall this is what our customer is requiring for an installation in
>>> Program Files.
>> Imho this sort of installation doesn't make sense. You are trying to
>> move a portable installation - meant for users which can't write to
>> program files - to this very place. Naturally the portable miktex
>> assumes that it has full writing access to its data - what do you
>> expected? The main point of a portable application is that it doesn't
>> use user profiles but its main folder.
>>
>> In my opinion your user1 has these options:
>>
>> 1. He installs a normal miktex in his restricted account in some
>> folder outside program files where he has writing rights. This will
>> give him a single user installation for this account. This works
>> without any problems - I have such installations on various PC
>> including one where I have very restricted rights.
>>
>> This won't need writing rights for program files at all - neither
>> during installation nor when using miktex.
>>
>> 2. If he has writing rights during the installation:
>>
>> - He could also try to make a single user installation in program
>> files. It *could* work and need writing rights only if new packages
>> need to be installed afterwards. But I never tried this.
>>
>> - Or he installs a multiuser installation. User1 can that use this
>> miktex in his account without writing rights for program files. New
>> packages will be installed to his user profile.
>>
>>
>
> --
> Richard Pember, Ph.D.
> Director of CFD Development
> Altair Engineering, Inc.
> 2685 Marine Way, Suite 1421
> Mountain View, CA 94043
> (650) 988-9700 x715 (Office)
> (650) 988-9770 (Fax)
> [email protected]
> http://www.altair.com
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> miktex-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/miktex-users
> -----------------------------------------------------------------------
> Confidentiality Notice: This e-mail message, including any attachments,
> is for the sole use of the intended recipient(s) and may contain
> privileged and confidential information.  Any unauthorized review, use,
> disclosure or distribution is prohibited.  If you are not the intended
> recipient, please contact the sender by reply e-mail and destroy
> all copies of the original message.
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> miktex-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/miktex-users
>


-- 
Richard Pember, Ph.D.
Director of CFD Development
Altair Engineering, Inc.
2685 Marine Way, Suite 1421
Mountain View, CA 94043
(650) 988-9700 x715 (Office)
(650) 988-9770 (Fax)
[email protected]
http://www.altair.com


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.