[Lazarus] GetAppConfigDir and GetAppConfigDirUTF8 and Apache

Michael Van Canneyt michael at freepascal.org
Thu Jul 6 10:55:58 CEST 2017



On Thu, 6 Jul 2017, Andrea Mauri via Lazarus wrote:

> Dear all,
>
> I have a question related GetAppConfigDir function when the application 
> is called from a script being run by apache.
> One of my application user gets this result from GetAppConfigDir(False):
>
> /root/.config/myappname
>
> since my app uses the local config dir to store some files if the 
> directory does not exit, the app tries to create it.
> Anyway since the resulting directory is in the root my app is not able 
> to create the file.
> Obviously the user doesn't want to give apache root permissions.
>
> Is there any solution? Any hint?

Normally, this means that the program is run as the root user.
I do not see how else the GetAppConfigDir can return the root user home dir
?

Michael.


More information about the Lazarus mailing list