Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Trevor Cappallo
OperationalLogging
Commits
f2744d9f
Commit
f2744d9f
authored
Aug 17, 2015
by
Trevor Cappallo
Browse files
change default log perms to 750/sgid
parent
47ca60d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
lib/OperationalLogging.py
lib/OperationalLogging.py
+2
-1
No files found.
lib/OperationalLogging.py
View file @
f2744d9f
...
...
@@ -164,7 +164,8 @@ def setup(config_file=None, logger_name=None, log_filename=None, log_root_dir=No
log_directory
=
os
.
path
.
join
(
log_root_dir
,
'log'
,
datetime
.
datetime
.
utcnow
().
strftime
(
'%Y-%m-%d'
))
if
not
os
.
path
.
exists
(
log_directory
):
try
:
os
.
makedirs
(
log_directory
,
0755
)
# default log dir permissions: SGID bit + rwxr-x---
os
.
makedirs
(
log_directory
,
02750
)
except
OSError
:
logging
.
warn
(
'Unable to create log directory %s'
,
log_directory
)
if
notify
is
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment