[Solved] Multicraft chmod (.PID file error)

Discussion in 'Systems Administration' started by mbcraft, Aug 30, 2015.

  1. Hi, today i was installing some plugins onto my server, and i decided because i was insalling them on every single server to chmod 777 -R the server folder with the servers inside it, anyway i got this error: [Multicraft] Failed to delete PID file! Please delete it manually and make sure the process is not running anymore. Message: [Errno 13] Permission denied: '/servers/9.pid'

    And anyway, i deleted all of the .pid files because it happened on all of the servers, and it still says that.

    Can someone please help me.

    Many thanks!
    - J

    EDIT: not 077 777 sorry :p
     
    #1 mbcraft, Aug 30, 2015
    Last edited: Aug 30, 2015
  2. Who told you to use 077 permissions? In no case is that a reasonable setting.
     
  3. One of my dev's who knows linux quite well, told me that because im not using the multicraft built in FTP and im using SFTP to chmod the file that i uploaded, and basically i thought that using chmod 777 -R to chmod all of the servers to 777 it would make it easier, but i chmod'd the .pid files (completely forgot they were there) and it stopped working :(
     
    • Funny Funny x 1
    • Creative Creative x 1
  4. You should never use 777 permissions except for test cases. Ever. If you must set loose permissions, use 775 - again, I'd only recommend this for testing. I would use 600 for your multicraft servers.
    You need to set the correct owner/group permissions. Unless you've configured your panel in some alternate way, each server folder should have their own user & group such as "mc<n>" - if the server's ID is 9, the group & owner would be mc9. You can set this with:
    chown mc9:mc9 <multicraft_path>/servers/<server>

    As for the PIDs, you do NOT want to recursively change permissions of the servers folder. You should run these to assure the correct permissions are set:
    chown minecraft <multicraft_path>/servers
    chmod 600 <multicraft_path>/servers

    (Adjust the "minecraft" user if you used another account name during installation)

    If none of this works, SELinux could be intefering, depending on your system.
    Check if it is running with:
    getenforce
    And disable it with:
    setenforce 0
    You'll have to adjust a system file accordingly to permanently change SELinux operation.
     
    • Useful Useful x 1
  5. Ok, so because ive deleted the .pid files on one of my VPS's if i download one of them and change it to the correct number then chmod 600 the .pid files it should work?
     
  6. No.
    Stop your multicraft daemon.
    Remove any persisting pid files.
    Correct the permissions of the <multicraft_path>/servers folder, not recursively.
    Make sure the individual server folders have the correct owner/group set.
    Start multicraft back up.
     
  7. Hmm, i got this when starting the bungeecord

    29.08 20:46:01 [Multicraft] Failed to initialize server
    29.08 20:46:01 [Multicraft] Loaded config for "Default"
    29.08 20:46:01 [Multicraft] Starting server!
    29.08 20:46:01 [Multicraft] Loading server properties
    29.08 20:46:01 [Multicraft] Received start command
    29.08 20:45:59 [Multicraft] Failed to delete PID file! Please delete it manually and make sure the process is not running anymore. Message: [Errno 13] Permission denied: '/servers/2.pid'
    29.08 20:45:59 [Disconnect] User disconnected with: You has disconnected, reason: Server shutting down
    29.08 20:45:59 [Disconnect] User WARNING: Error dispatching event ServerKickEvent(cancelled=false, player=Kkthisrules, kickedFrom=BungeeServerInfo(name=Lobby, address=/127.0.0.1:*****, restricted=false), kickReasonComponent=[TextComponent{text=You has disconnected, reason: Server shutting down
     
  8. Hmm. Might've been my bad, try using 660:
    chmod 660 <multicraft_path>/servers
     
  9. I was more looking for multicraft errors.
    How are you launching the daemon?
     
  10. Im using the pannel start & stop buttons.
     
  11. Are you kidding me? You haven't been restarting the multicraft daemon this entire time?
    /home/minecraft/multicraft/bin/multicraft -v restart
     
  12. Sorry, im not very expirienced :/
     
  13. Ok, no .pid errors now, but im getting this:
    29.08 21:27:43 [Multicraft] Failed to initialize server
    29.08 21:27:43 [Multicraft] Loaded config for "Default"
    29.08 21:27:43 [Multicraft] Starting server!
     
  14. You didn't fix your permissions after you set them to 077 like I told you to.
    chmod -R 660 /home/minecraft/multicraft/servers/*
     
  15. By the way, thank you soo much for helping! :D
     
  16. Again, ive just set the permission to 660 but ive got this still (and i restarted the damon).
    29.08 21:32:27 [Multicraft] Loading server properties
    29.08 21:32:06 [Multicraft] Failed to initialize server
    29.08 21:32:06 [Multicraft] Loaded config for "Default"
    29.08 21:32:06 [Multicraft] Starting server!
    29.08 21:32:06 [Multicraft] Loading server properties
    29.08 21:32:05 [Multicraft] Loading server properties