1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved Failed to Open Stream: Permission Denied

Discussion in 'Help' started by Gabriel Gomez, Aug 11, 2017.

  1. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
    I am running my server off of a Linux VPS. The full details are listed in the crashdump linked below. I used to run my server off of root but then decided to expand and make separate servers for separate games/gameplay options. I downloaded the world and the plugin .phars that I was using and then completely wiped the VPS. I created the new users, uploaded my files, and decided to test it all by joining and received this error:​

    Code:
    [23:15:00] [Server thread/CRITICAL]: ErrorException: "fopen(/home/spawn/worlds/Waldheim/region/r.0.0.mca): failed to open stream: Permission denied" (EXCEPTION) in "src/pocketmine/level/format/io/region/RegionLoader" at line 73
    [23:15:00] [RakLibServer thread/NOTICE]: Blocked ***.***.***.*** for 5 seconds
    My MCPE kept trying to load it for another 2 minutes until the server crashed. I do not have the console error but here is the crashdump: https://crash.pmmp.io/view/2490

    If any of you need any more information to help better analyse the error/crash then please just ask.
    (Sorry again for my many questions that I am just not smart enough to figure out the answer)
     
    Last edited: Aug 11, 2017
  2. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
    UPDATE: I started the server when posting this thread and I have the console error because it crashed again after a join attempt:

    Code:
    [23:18:05] [Server thread/CRITICAL]: ErrorException: "file_put_contents(/home/spawn/worlds/Waldheim/level.dat): failed to open stream: Permission denied" (EXCEPTION) in "src/pocketmine/level/format/io/BaseLevelProvider" at line 130
    [23:18:05] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
    [23:18:05] [Server thread/EMERGENCY]: Please upload the "/home/spawn/crashdumps/Thu_Aug_10-23.18.05-UTC_2017.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
    [23:18:05] [Server thread/EMERGENCY]: The crash dump has been automatically submitted to the Crash Archive. You can view it on https://crash.pmmp.io/view/2491 or use the ID #2491. 
    Now I have 2 crashdumps.... whoops
     
    Last edited: Aug 11, 2017
  3. Eduardo

    Eduardo Baby Zombie

    Messages:
    100
    GitHub:
    xBeastMode
    Bruh... Please use code tags.
    Clearly it says that read/write permission is denied. To fix this use `chmod`:
    PHP:
    cd /your/server/path
    sudo chmod 777 ./
     
    Gabriel Gomez and EdwardHamHam like this.
  4. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
    Fixed
     
  5. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
  6. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
  7. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
    A new world works, it is just that one world that does not work
     
  8. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    You probably need to set the folder permission recursively.
     
  9. Jack Noordhuis

    Jack Noordhuis Zombie Pigman Poggit Reviewer

    Messages:
    618
    GitHub:
    JackNoordhuis
    open up an SSH session to your VPS and chmod the worlds folder recursively:
    Code:
    sudo chmod -R 777 ./path/to/worlds/from/current/directory
    
     
  10. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
    I have seen a little checkbox like that on my File Manager, I checked it and it appears to be working now. Thank you! @Jack Noordhuis and @Muqsit
     
  11. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
    Okay, now I can actually join the world but after joining (Maybe 2-5 minutes later) it crashes and according to chrash.pmmmp.io I am not the only one experiencing this issue:
    upload_2017-8-11_9-52-7.png
    Here is the crashdump: https://crash.pmmp.io/view/2504
     
  12. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
    And it is broken yet again, now I have this error:
    Code:
    [15:01:25] [Server thread/CRITICAL]: TypeError: "fseek() expects parameter 1 to be resource, null given" (EXCEPTION) in "src/pocketmine/level/format/io/region/RegionLoader" at line 108
    [15:01:25] [Server thread/INFO]: Unloading level "world"
    [15:01:25] [Server thread/INFO]: Unloading level "Waldheim"
    Killed
    
    https://crash.pmmp.io/view/2506
     
  13. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    You still have permission problems. Try applying permission recursively as above indicated.
     
  14. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
    Is this correct?
    Code:
    sudo chmod -R 777 ./home/spawn/worlds/
     
  15. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    this is correct for your worlds, but you might also want to simply do it on the whole server to finally get rid of all problems.
     
  16. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
    I am assuming that it would be:
    Code:
    sudo chmod -R 777 /home/
    (/home is where my servers are located)
     
    Last edited: Aug 11, 2017
  17. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    well, you better do it for all your individual servers and not for your whole home server
    e.g.:
    Code:
    sudo chmod -R 777 ./home/spawn/
    sudo chmod -R 777 ./home/someotherserver/
    
     
  18. Gabriel Gomez

    Gabriel Gomez Spider Jockey

    Messages:
    32
    GitHub:
    ggomez
    Oh well, I did it already :I Working fine so far!
     
  19. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Why +x...
     
  20. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Do you get any errors running it as root or a user from the sudoers?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.