symlink with FTP

Apparently you can’t use FTP for symlinks? It’s been so long since I have mucked around with FTP, that I didn’t realize you could not create symlinks. I have an old site I still maintain and had to move it to a new hosting provider and the new provider did not give SSH access (well at least without charging for it). PHP to the rescue:


<?php
symlink
(‘../gallery’,‘gallery’);

?>


Use the symlink command in PHP. Obviously you need to have the proper permissions, and since PHP may be running as a different user, your mileage may very. But it worked for me…

2 Responses to “symlink with FTP”

  1. John Comeau Says:

    Yeah, I tried the same with Python this morning, no luck on Netsol’s webservers. The Apache process doesn’t have suexec enabled, so am pretty well locked down. No subprocesses allowed either. And apparently a system umask of 002 overriding my own, so no world-writeable directories either. Can you think of anything else I could try? Thanks! — jc

  2. Administrator Says:

    Sorry, can’t think of anything else that may work….

Leave a Reply