Fix some permissions

This commit is contained in:
Neale Pickett 2018-08-08 15:49:51 +00:00
parent e7324c30f5
commit 0b701722fe
4 changed files with 23 additions and 7 deletions

View File

@ -17,7 +17,7 @@ install: $(BINARIES) $(HTML)
install summary.awk $(DESTDIR)/bin install summary.awk $(DESTDIR)/bin
install forftanks $(DESTDIR)/bin install forftanks $(DESTDIR)/bin
install -d $(DESTDIR)/www install -d -o $(id -u www) -g $(id -g www) $(DESTDIR)/www
install upload.cgi $(DESTDIR)/www install upload.cgi $(DESTDIR)/www
install -m 0644 $(HTML) $(DESTDIR)/www install -m 0644 $(HTML) $(DESTDIR)/www
install -m 0644 $(WWW) $(DESTDIR)/www install -m 0644 $(WWW) $(DESTDIR)/www

View File

@ -12,8 +12,8 @@ Documentation
------------- -------------
* [Homepage](https://dirtbags.github.io/tanks/) * [Homepage](https://dirtbags.github.io/tanks/)
* [History](doc/history.md) * [History](docs/history.md)
* [Running](doc/running.md) * [Running](docs/running.md)
Author Author

View File

@ -38,18 +38,18 @@ game. This is what tanks.js uses to render a game graphically.
The object printed contains: The object printed contains:
[[game-width, game-height], [[game-width, game-height],
[[tank1-color, [[tank1-color,
[[sensor1range, sensor1angle, sensor1width, sensor1turret], [[sensor1range, sensor1angle, sensor1width, sensor1turret],
...]], ...]],
...], ...],
[[ [[
[tank1x, tank1y, tank1angle, tank1sensangle, [tank1x, tank1y, tank1angle, tank1sensangle,
tank1flags, tank1sensors], tank1flags, tank1sensors],
...], ...],
...]] ...]]
If file descriptor 3 is open for writes, it also outputs the results of If file descriptor 3 is open for writes, it also outputs the results of
the round to fd3. the round to fd3.
### rank.awk ### rank.awk
@ -70,4 +70,20 @@ Accepts form input and writes a tank.
Problems
========
Nothing uploads
---------------
The user running the web server has to be able to write to the directory serving the CGI.
Yes, I realize this is a terrible design. Please feel encouraged to submit a merge request.
Only sensors upload
-------------------
The user running the web server has to be able to write to the directory serving the CGI.
Not just the directory with the tank token.
Yes, I realize this is a terrible design. Please feel encouraged to submit a merge request.

2
go.sh
View File

@ -3,7 +3,7 @@
cd $(dirname $0)/../www cd $(dirname $0)/../www
( (
s6-tcpserver -u 80 -g 80 0.0.0.0 80 /usr/bin/eris -c -. s6-tcpserver -u $(id -u www) -g $(id -g www) 0.0.0.0 80 /usr/bin/eris -c -.
) & ) &
( (