Skip to content

Commit

Permalink
create logs directory with new permissions
Browse files Browse the repository at this point in the history
owner root, group pf, only writable by root, readable by pf
  • Loading branch information
nqb committed Jun 30, 2022
1 parent ba746c8 commit 3d55d1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion debian/packetfence.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ case "$1" in
chmod ug+s $PACKETFENCE/bin/pfcmd

chown pf:pf $PACKETFENCE
find $PACKETFENCE '(' -type d -or -type f ')' -not -name pfcmd -print0 | xargs -0 chown pf:pf
find $PACKETFENCE '(' -type d -or -type f ')' -not -name pfcmd -not -name "logs" -print0 | xargs -0 chown pf:pf
chgrp pf $PACKETFENCE/logs

# link to latest SQL schema
if [ -h "$PACKETFENCE/db/pf-schema.sql" ]; then
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ install: build
install -d -m0700 $(CURDIR)/debian/packetfence$(PREFIX)/$(NAME)/conf/ssl
install -d -m0700 $(CURDIR)/debian/packetfence$(PREFIX)/$(NAME)/conf/ssl/acme-challenge
install -d -m0700 $(CURDIR)/debian/packetfence$(PREFIX)/$(NAME)/raddb/sites-enabled
install -d -m2770 $(CURDIR)/debian/packetfence$(PREFIX)/$(NAME)/logs
install -d -m0750 $(CURDIR)/debian/packetfence$(PREFIX)/$(NAME)/logs
install -d -m2770 $(CURDIR)/debian/packetfence$(PREFIX)/$(NAME)/var/conf
install -d -m2770 $(CURDIR)/debian/packetfence$(PREFIX)/$(NAME)/var/cache
install -d -m2770 $(CURDIR)/debian/packetfence$(PREFIX)/$(NAME)/var/cache/ntlm_cache_users
Expand Down
4 changes: 2 additions & 2 deletions rpm/packetfence.spec
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ done
%{__install} -d %{buildroot}/usr/local/pf/conf/radiusd
%{__install} -d %{buildroot}/usr/local/pf/conf/ssl
%{__install} -d %{buildroot}/usr/local/pf/conf/ssl/acme-challenge
%{__install} -d -m2775 %{buildroot}%logdir
%{__install} -d -m0750 %{buildroot}%logdir
%{__install} -d %{buildroot}/usr/local/pf/raddb/sites-enabled
%{__install} -d -m2775 %{buildroot}/usr/local/pf/var
%{__install} -d -m2775 %{buildroot}/usr/local/pf/var/cache
Expand Down Expand Up @@ -1213,7 +1213,7 @@ fi
/usr/local/pf/containers
%attr(0755, pf, pf) /usr/local/pf/containers/*.sh

%dir %attr(02755, pf, pf) /usr/local/pf/logs
%dir %attr(0750, root, pf) /usr/local/pf/logs
%doc /usr/local/pf/NEWS.asciidoc
%doc /usr/local/pf/NEWS.old
%doc /usr/local/pf/README.md
Expand Down

0 comments on commit 3d55d1f

Please sign in to comment.