Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ixus

Pages: [1]
1
FTP / SFTP chroot
« on: April 25, 2015, 02:50:35 PM »
By default on my testserver and real server, I can walk out of my /home directory and view other peoplese files when using SFTP (or SSH). So user is not real chrooted.

I think I remember that this worked first time I tested, but not any more..

What is the best way to correct this? I have found a guide that explains how to do this step by step:
https://wiki.archlinux.org/index.php/SFTP_chroot

I have changed sshd to this:
Match Group vhosts
ChrootDirectory %h
ForceCommand internal-sftp
AllowTCPForwarding no
X11Forwarding no

Filezilla gives this:
Connected to XXX
Error:   Received unexpected end-of-file from SFTP server

Sercure-log gives this:
Apr 25 16:27:05 myhost1 sshd[35917]: pam_unix(sshd:session): session opened for user mytestuser by (uid=0)
Apr 25 16:27:05 myhost1 sshd[35919]: subsystem request for sftp
Apr 25 16:27:05 myhost1 sshd[35917]: pam_unix(sshd:session): session closed for user mytestuser

I have chown root for home-directory and I have added mytestuser to the group vhosts (a built in group already present would be better).

2
Scripts / Script or api to create user
« on: April 24, 2015, 03:24:11 PM »
Hi,

Do you have a way to create a new user from shell/php? I need the option to create a user, a database/dbuser and run a few commands to automate a process.

I can do it using normal shell, but it would be best to be able to have the user set up the "cwp"-way so that it is consistent and appear correctly in the interface.

Have looked through some scripts, but I got a php-message saying that I didn't have authorization or something like that, they where also encrypted. If I just could cun the add-user script with command line arguments it would be fantastic..

Pages: [1]