You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2023/01/27 13:26:00 UTC

[jira] [Created] (DAEMON-452) Should we create the target folder before apxSecurityGrantFileAccessToUser?

Gary D. Gregory created DAEMON-452:
--------------------------------------

             Summary: Should we create the target folder before apxSecurityGrantFileAccessToUser?
                 Key: DAEMON-452
                 URL: https://issues.apache.org/jira/browse/DAEMON-452
             Project: Commons Daemon
          Issue Type: Improvement
          Components: prunsrv
    Affects Versions: 1.3.3
         Environment: Windows
            Reporter: Gary D. Gregory


Our API apxSecurityGrantFileAccessToUser will fail if the target folder does not exist.

Shouldn't we create this folder in advance of this call?

Names and paths obfuscated in this example:
{code}
[2023-01-27 13:55:39] [info]  ( prunsrv.c:2018) [ 7340] Apache Commons Daemon procrun (1.3.3.0 64-bit) started.
[2023-01-27 13:55:39] [debug] ( prunsrv.c:774 ) [ 7340] Installing service...
[2023-01-27 13:55:39] [info]  ( prunsrv.c:831 ) [ 7340] Installing service 'ABC' name 'XYZ'.
[2023-01-27 13:55:39] [debug] ( prunsrv.c:860 ) [ 7340] Setting service description 'XYZ'.
[2023-01-27 13:55:39] [warn]  ( prunsrv.c:759 ) [ 7340] Failed to grant service user 'NT AUTHORITY\LocalService' write permissions to log path 'C:\ProgramData\Example Company\Example Product\10.3991.0.0\Default\logs' due to error '2: The system cannot find the file specified.'
[2023-01-27 13:55:39] [info]  ( prunsrv.c:882 ) [ 7340] Service 'ABC' installed.
[2023-01-27 13:55:39] [info]  ( prunsrv.c:2102) [ 7340] Apache Commons Daemon procrun finished.
Service 'XYZ' was installed succesfully
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)