Permissions, SFTP - not working on 0.8.5 #120
Replies: 6 comments 1 reply
-
leang_97 wrote at Feb 13 2016 15:54:39 UTC: Do NOT upload ur minecraft server files as root. |
Beta Was this translation helpful? Give feedback.
-
mrsal511 wrote at Feb 13 2016 15:54:39 UTC: 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. |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Feb 13 2016 15:54:39 UTC: If the files are already there, you can use "chown -R : /home//public" replacing 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. |
Beta Was this translation helpful? Give feedback.
-
mrsal511 wrote at Feb 13 2016 15:54:39 UTC: 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 142.3.119.144 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 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 /home//public instead of /home/ ? 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. |
Beta Was this translation helpful? Give feedback.
-
leang_97 wrote at Feb 13 2016 15:54:39 UTC: Your file permission should be 755 and the group user should be scaesuser |
Beta Was this translation helpful? Give feedback.
-
puffrfish wrote at Feb 13 2016 15:54:39 UTC: 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 |
Beta Was this translation helpful? Give feedback.
-
mrsal511 wrote at Feb 13 2016 15:54:39 UTC:
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:
: fatal: bad ownership or modes for chroot directory "/home/"
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
or
[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.
Beta Was this translation helpful? Give feedback.
All reactions