If you want to disable file transfer, you can do this by editing the cfg files as explained in that article I mentioned in my earlier reply. I don’t know what permissions your users have. If they don’t have administrator rights on the server, then they won’t be able to re-enable it.
Or you can do it in the server UI itself. Again, this depends on what permissions your users have on the server host. If the connecting user is an admin user, it’s impossible to prevent them from accessing the server preferences.
Regarding the ports, you must have port 4000 open in order to accept connections in general. If you disable it, you won’t be able to connect at all. Ports 22 are for SSH connection on Mac/Linux and 4022 on Windows.