Dreamweaver will not let me FTP to the root directory of my site but allows me to read and write to any subdirectory. The reason, according to the FTP log is outlined below:
< 226 Directory send OK.
> CWD /
< 250 Directory successfully changed.
> CWD /images
< 550 Failed to change directory.
Even though I'm trying to upload a file to the root for some reason DW is trying to change directory to '/images'. This folder is a symlink (and is picked up by DW) and I'm using passive mode:
> CWD /
< 250 Directory successfully changed.
< 227 Entering Passive Mode (*).
> LIST -al
< 150 Here comes the directory listing.
< lrwxrwxrwx 1 502 50 16 Apr 16 14:49 images -> /mnt/san/images/
This folder is cloaked on the remote server and does not exist on my local machine so I've no idea why DW is trying to access this folder. Permissions are fine and I can FTP to the root directory using the command line and the same FTP account without issue:
ftp> put "foo.bar" /foo.bar
229 Entering Extended Passive Mode (|||44317|).
150 Ok to send data.
100% |**************************************************************| 834 5.89 MiB/s 00:00 ETA
226 Transfer complete.
It's driving me mad because I'm using Subversion (which works fine) and every time I need to commit a change to live in the root directory I have to revert to the command line.
So, why is DW doing this and more importantly how can I stop it from trying to CWD to '/images', which is effectively killing the FTP process?
The only relevant entries would be the Root Directory which is blank because the FTP user's home directory is the root of the website. Under 'More Options' I have the 'Use Passive FTP' and 'Use FTP performance optimization' options checked.
There is nothing wrong with the FTP user's credentials because I can connect, navigate, edit and upload files and folders to all subdirectories. It's just when I try and upload to the root directory that I get an error. So, for example, I can upload /somefolder/foo.bar without issue, but if I try and upload /foo.bar I get the error.
I use a third-party FTP program, but every site definition includes specifying the root folder on the remote site as well as the local.
In my case it's an advanced setting appearing as /var/www/html which matches the hosting company's folder hierarchy.
It will depend on how your FTP user was set up and what has been defined as the user's home directory. Having '/var/www/html' as the site directory in DW would imply that the FTP user could navigate down the document tree, but that isn't the case with the FTP user I'm using as it is a jailed account so navigating down the document tree is not possible. This is partly the problem: DW is trying to gain access to the '/images' folder which is a symbolic link to '/mnt/san' (a mounted SAN drive) but my FTP user doesn't have permission to do this, however this is not the point: DW should not be trying to access '/images' in the first place and I don't know why it is trying!
Sorry, I don't have a recent Version, but IMHO you need an entry an the "root" directory site definition.(as shown in this video)
That "images" target is coming from somewhere, perhaps a symlink you could move or delete?
Have you tried deleting the current site definition and setting it up again?
You're not on Godaddy by any chance?
Thanks for your suggestions Ken.
I've tried setting up the site definition again, yes and I've also tried putting '/' in the root directory. I've also tried putting the literal '/path/to/site' in the directory but as I suspected doing this means DW won't even connect via FTP as it's trying to navigate to 'path/to/site/path/to/site' because my FTP user's home directory is already '/path/to/site'.
I've just got this sneaking suspicion that DW is detecting the /images directory and it's trying to index it despite me cloaking it on the remote server. If I can get it to stop trying to do that then the problem should be solved. I just don't know how!
I can't delete it because it's required by the website. It's a symlink because it's a mounted SAN. I could mount the SAN to the website root which might solve the problem but it's a shared resource so I don't want to do that.
I could also unjail the FTP account so that it can navigate to /mnt/san and then DW will be able to access the /images folder but I don't want to do that either for security reasons.
I just want DW to stop tying to automatically access the folder.