fix for log file permissions
This commit is contained in:
@@ -1586,7 +1586,8 @@ async function buildCaddyDocument() {
|
||||
http_access: {
|
||||
writer: {
|
||||
output: "file",
|
||||
filename: "/logs/access.log"
|
||||
filename: "/logs/access.log",
|
||||
mode: "0640"
|
||||
},
|
||||
encoder: {
|
||||
format: loggingFormat
|
||||
|
||||
@@ -139,7 +139,7 @@ async function readLines(startOffset: number): Promise<{ lines: string[]; newOff
|
||||
|
||||
const stream = createReadStream(LOG_FILE, { start: startOffset, encoding: 'utf8' });
|
||||
stream.on('error', (err: NodeJS.ErrnoException) => {
|
||||
if (err.code === 'ENOENT') resolve({ lines: [], newOffset: startOffset });
|
||||
if (err.code === 'ENOENT' || err.code === 'EACCES') resolve({ lines: [], newOffset: startOffset });
|
||||
else reject(err);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user