Fix some permission issues

This commit is contained in:
nemunaire 2014-12-28 14:51:40 +01:00
parent 7865fbdf1f
commit da1e9da495
3 changed files with 13 additions and 7 deletions

View File

@ -29,6 +29,8 @@ RUN apt-get -y update && \
RUN cpanm Mcrypt RUN cpanm Mcrypt
RUN useradd -d /var/www/fic-server/misc/ -M -N -g www-data synchro
WORKDIR /var/www/fic-server/misc WORKDIR /var/www/fic-server/misc
# Copying files ####################################################### # Copying files #######################################################
@ -65,7 +67,10 @@ RUN ln -sf /var/www/fic-server/onyx/config/sample.root.xml /var/www/fic-server/o
EXPOSE 80/tcp 443/tcp EXPOSE 80/tcp 443/tcp
VOLUME ["/var/www/fic-server/out","/var/www/fic-server/files","/var/www/fic-server/submission","/var/www/fic-server/misc/shared"] VOLUME ["/var/www/fic-server/out","/var/www/fic-server/files","/var/www/fic-server/submission","/var/www/fic-server/misc/shared"]
CMD chown -R www-data:www-data /var/www/fic-server/misc /var/www/fic-server/submission; \ CMD mkdir -p /var/www/fic-server/logs; \
chown -R www-data:www-data /var/www/fic-server/misc; \
chown -R synchro:www-data /var/www/fic-server/submission /var/www/fic-server/logs /var/www/fic-server/out; \
chmod 660 /var/www/fic-server/submission; \
if ! [ -f server.crt ]; \ if ! [ -f server.crt ]; \
then \ then \
bash ./CA.sh -newserver; \ bash ./CA.sh -newserver; \

View File

@ -348,6 +348,7 @@ sub create_socket
Type => SOCK_STREAM, Type => SOCK_STREAM,
Listen => SOMAXCONN, Listen => SOMAXCONN,
); );
chmod 0660, $socket_path;
say "Socket listening on $socket_path; waiting for connections..."; say "Socket listening on $socket_path; waiting for connections...";
while(my $connection = $socket->accept) while(my $connection = $socket->accept)

View File

@ -7,12 +7,12 @@ cd `dirname "$0"`
source config.sh source config.sh
#if [ "$UID" = "0" ] if [ "$UID" = "0" ]
#then then
# SCRIPT=`pwd`/`basename "$0"` SCRIPT=`pwd`/`basename "$0"`
# su -c "sh $SCRIPT" "$SYNCHRO_USER" su -c "sh $SCRIPT" "$SYNCHRO_USER"
# exit $? exit $?
#fi fi
mkdir -p ./logs mkdir -p ./logs