Welcome to the PufferPanel community forums! If you need help please register an account and post in the Support category.

Permissions, SFTP - not working on 0.8.5

  • I have tried to install scales on clean installation of Debian 8.2 and 8.3 (2 times each). I have tried to install scales clean twice on Ubuntu 15.04 and three times on Ubuntu 15.10. I have tried the auto install script and the manual methods. No matter what I do, SFTP is broken for every single user who tries to use it. Still getting this bug even after running the chown root:root command one of the devs posted in another topic:
    <server>: fatal: bad ownership or modes for chroot directory "/home/<user>"

    To make matters worse, if you try and concede and go without SFTP for the time being, than the Permissions IO bug bites you:
    [23:52:11 ERROR]: Could not save bukkit.ymljava.io.FileNotFoundException: bukkit.yml (Permission denied) at java.io.FileOutputStream.open0(Native Method) ~[?:1.8.0_72] at
    [23:52:11 ERROR]: Could not save commands.ymljava.io.FileNotFoundException: commands.yml (Permission denied) at java.io.FileOutputStream.open0(Native Method) ~[?:1.8.0_72]

    The installations and SSL certificates install without a hitch, but its not usable like this. Any help or suggestions because I am at a loss now.

  • Do NOT upload ur minecraft server files as root.

  • How do I upload the files as a user if the SFTP is broken? I guess I could manually create a user, but that's seems like an extravagant amount of effort to go to for that.

    If I am being a little more specific here, I run a server hosting business and we recently decided to substantially upgrade our hardware. I'm running a SCP transfer between the two servers to get the files from the old box to the new box.

    Any advice for these problems? Unfortunately I can't download a terabyte of data locally and then re-upload to the new box as a different user. Is there a chown command I can run on these transferred files?

    If its helpful to you, the chmod on the user directories has to have group and user write off for it to be connectable via SFTP. In other words a chmod of 755. Does this break other features if I change the install script in scales to give 755 instead of 770? I realize the public folder is chmod 755, but the users connectable home folder is one dir above that.

  • If the files are already there, you can use "chown -R <user>:<user> /home/<user>/public" replacing <user> with the SFTP username for that server, and it should fix those files.

    Because of SFTP jailing, we have to do some trickery to make sure it works correctly with regular SFTP, and to provide some security to the servers and not run as root, they have to run as the standard user, which is why the files must be uploaded as that regular user.

  • When I try to run the command above I still can't connect via SFTP. It spits out this in auth.log:

    Feb 14 15:41:50 ns525514 sshd[6889]: Accepted password for pp-admin-_pv1bl from port 55627 ssh2
    Feb 14 15:41:50 ns525514 sshd[6889]: pam_unix(sshd:session): session opened for user pp-admin-_pv1bl by (uid=0)
    Feb 14 15:41:51 ns525514 systemd-logind[1216]: New session 1591 of user pp-admin-_pv1bl.
    Feb 14 15:41:51 ns525514 systemd: pam_unix(systemd-user:session): session opened for user pp-admin-_pv1bl by (uid=0)
    Feb 14 15:41:51 ns525514 sshd[6941]: fatal: bad ownership or modes for chroot directory "/home/pp-admin-_pv1bl"
    Feb 14 15:41:51 ns525514 sshd[6889]: pam_unix(sshd:session): session closed for user pp-admin-_pv1bl
    Feb 14 15:41:51 ns525514 systemd-logind[1216]: Removed session 1591.

    If the public folder is the one that the user has permissions for, should that not be the folder that PufferPanel/Scales sets for the user to connect to by default? From what I can gather its trying to force the user to join in the <user> folder which is owned by root as it should be for the new chmod SFTP jailing.

    ie. Shouldn't it tell the user to join
    instead of

    Remember regardless of the server or where the servers came from i cannot connect via SFTP. This includes the default Vanilla generated servers by PufferPanel.

  • Your file permission should be 755 and the group user should be scaesuser

  • @leang_97 and the files users should be pp-xxxxxx , i got this error when the file users is incorrect or the permissions is 777.

  • Please try the newly released version of Scales, it should fix your issue. If you need instructions on how to update Scales, please see http://scales.pufferpanel.com/docs/how-to-update-scales-to-the-latest-version

Log in to reply