Originally posted by Ellmb
I pay for web space and don't know alot about hosting sites. I want a standard 404 message and i think i know how to do it, when i try and upload the .htaccess file through FTP it says that it is a forbidden file name. When i upload the basic txt file and then try and rename it in CuteFTP or Dreamweavers upload facility both programs just freeze on me and then time out.
Is it my host? am i doing anything wrong?
Suggestions would be appreciated.
Do you have shell (telnet/SSH) access or are you allowed to run CGI or PHP scripts? Or, does your FTP client list or display the remote file in question? If you have any of these options or FTP does display that information, you can check and see if the file is owned by another user other then your own, of if there's one at all.
I know that a server I was working with wanted to not allow user's to alter their .htaccess files for various reasons, and they wanted to make it so the user's couldn't overwrite the existing one, which was owned by root and set to a permission level that would deny anyone but root to overwrite it. This person stated that their FTP client (which happened to be CuteFTP actually) wouldn't let them overwrite, rename or delete it. I told him that since the file was in a directory owned by said user that it could be deleted without a problem. He didn't believe me for some reason, so I simply FTPed in using WS_FTP (which is what I use when on Windows) and I just selected it and deleted it without a problem.
I don't use CuteFTP, but this seems like CuteFTP has some issue about denying people the ability to delete .files that aren't owned by their user and/or group and has a lower permission setting, such as 644 (which isn't that low, nor is it a good or workable protection). Certainly, if a file exists already, then in FTP you can't rename another file to that file's name, even if it's owned by you. If you have shell access, you can likely delete the file there, if it does exist.
Of course, it may by the provider in question, as there's certainly (easy) ways to deny user's from uploading, renaming or overwriting certain file names and directory names. Some providers do deny uploading or renaming files to that name, for various reasons. Although I believe they should just disable user's from using .htaccess and not worry about uploads, etc. Perhaps just only allow user's to input error directives only would be a better solution? This issue of CuteFTP though, makes me wonder if it's just that simple. Something to check out, I guess. When in doubt, email your provider's support contact and ask. Your provider may very well offer custom 404 pages. Try uploading a file called 404.html or missing.html and access an invalid URL on your site and see what happens.
[Edited by Tim_Greer on 03-05-2001 at 12:25 PM]