pdinklag / MinecraftStats

A Minecraft player statistics browser for the web - supports 1.13 and later!
https://discord.gg/brH5PGG8By
Other
227 stars 53 forks source link

What perms does it need to read the files? #62

Closed lukeeexd closed 4 years ago

lukeeexd commented 4 years ago

I changed the perms on linux for my directories, I had it as 750 but stats seems to have broke. What perm level does it need?

failed to update profile for Samuel_2019 (3cfd4ffa-33bc-47a8-bfab-14e982db50bf)
HTTP Error 429: 429
updating profile for 5e3f6b01-08f8-4eb4-bd18-77913afc45ff ...
Traceback (most recent call last):
  File "update.py", line 141, in <module>
    profile = mojang.get_player_profile(uuid)
  File "/home/www/html/stats/mojang.py", line 12, in get_player_profile
    with urllib.request.urlopen(profile_api_url + compact_uuid) as response:
  File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 429: 429

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "update.py", line 159, in <module>
    print('failed to update profile for ' + player['name'] + ' (' + uuid + ')')
KeyError: 'name'

Also this

  File "update.py", line 297, in <module>
    shutil.copy(args.server + '/server-icon.png', args.database)
  File "/usr/lib/python3.6/shutil.py", line 245, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.6/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'data/server-icon.png'

Edit got it working again, but now it has no icon and server name is there twice. https://i.imgur.com/5limLSY.png if I remove --server-name from args it shows MOTD which has colour codes in it which dont display. I've actually removed the icon and server name. How can I make last update slightly bigger text?

pdinklag commented 4 years ago

All files and directories of your Minecraft installation must be readable naturally by the update.py user, it needs to write its data into data and at least the update.py must be executable, I suppose.

I don't have an overview over your file system. If you say that you changed all permissions, that's not something I can offer support for. Make sure whatever user executes update.py has read access to your Minecraft server.

Coloured MOTDs will not be converted and not displayed on the site. I will open a separate issue for this.

lukeeexd commented 4 years ago

Ok that wouldnt make sense then, it still should have worked. Anyway it works now :P