[Lazarus] GetAppConfigDir and GetAppConfigDirUTF8 and Apache

Andrea Mauri andrea.mauri.75 at gmail.com
Thu Jul 6 11:12:29 CEST 2017


>> 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.
>

I cannot test it, I will ask for more details.
Thanks,
Andrea


More information about the Lazarus mailing list