Stonley890/mc-console-bot

Permission Denied

Closed this issue · 7 comments

Describe the bug
When I put $startserver in Discord for the bot it send back a message saying:

'An error occurred while starting the server: [Errno 13] Permission denied: '/home/jake/Minecraft-MCServer/run.bat''

There is no error displayed on the bot window just in Discord

What is requiring the permissions?

Probably a v simple fix am just stuupeed haha

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
The server to start

Screenshots
If applicable, add screenshots to help explain your problem. Remember to remove or obfuscate your Discord Bot Token.

Environment (please complete the following information):

  • OS: Ubuntu

Additional context
Add any other context about the problem here.

Thanks for opening an issue! .bat scripts are exclusive to windows. On Ubuntu, you'll want to use a .sh script, which can be generated from https://flags.sh.

So I should have mentioned that I can start the MC Server using both .bat and .sh on here normally (tried both for the bot as well) but it just returns that error in discord

Path being this
image

Your file may not be marked as executable. Try this command to make it executable:

chmod +x path/to/start.sh

I have just done that and I am getting the same output

Weird as I can start the server anyway and it runs as normal it just doesn't want to start with the bot

This may not be a permission issue, actually.
Try relocating the mc-console-bot.py script inside your Minecraft-MCServer folder and setting the variable locally.

MINECRAFT_SERVER_PATH = './run.bat'

Okay so with the .bat it did not work but with the .sh it has worked! Than you for your assistance :)

This may not be a permission issue, actually. Try relocating the mc-console-bot.py script inside your Minecraft-MCServer folder and setting the variable locally.

MINECRAFT_SERVER_PATH = './run.bat'

The above fixed my issue but using the .sh start instead of the .bat