changing .htaccess file

changing .htaccess file

Posted by: paulen
Posted on: 2007-01-25 17:28:00

I'm trying to modify 'directory/index of' to list full names of files I've stored on a domain I created with Dream Host. Attempts of adding 'IndexOptions +NameWidth=*' and 'IndexOptions +FoldersFirst' to .htaccess file (stored under WebFTP on that domain) gives a message, "This file could not be saved." Also, "Permission denied in /usr/local/ndn/web/webftp/includes/filesystem.inc.php on line 637. How may I get the permission to change the .htaccess file?

Re: changing .htaccess file

Posted by: ardco
Posted on: 2007-01-25 17:37:00

I don't use webftp, but, you might try deleting the old .htaccess file first, then save the new one.

Re: changing .htaccess file

Posted by: paulen
Posted on: 2007-01-25 17:56:00

Thanks a lot. Finally, I managed to change the file.

Re: changing .htaccess file

Posted by: rlparker
Posted on: 2007-01-25 18:07:00

paulen,

First of all, you should not get in the habit of editing *nix "text files" (like .htaccess) in WebFtp.

From the Dreamhost Wiki Article on CGI, PHP, and Databases:

In reply to:

Another problem is the WebFTP text editor available in your Dreamhost panel. After editing a perl script in WebFTP, it will have DOS carriage returns and will no longer work. Do not use Dreamhost's WebFTP to edit your perl scripts. WebFTP is EVIL!!!!


Your best bet is to use a shell text editor, such as pico or nano, to work on such files (which will also eliminate any "permissions" strangeness you see using WebFtp as an editor when trying to save the file).

Alternately, of course, you can use a pure "text" editor on your own computer, and just upload the resultant file(s) via ftp to the appropriate place in your directory structure. Look for an editor you like that is capable of saving "with *nix line endings", or run "dos2unix" from the shell to "post-process" such files. Finding an editor that uses *nix lline endings it the better way to go. There are *lots* of them out there that are free - just google and try a few till you find one you really like.

--rlparker

Tags: htaccess filewebftpndnpermission denieddirectory indexusr