Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: bakedjake
Then try opening up your file from the command prompt using something like
Depending on what GUI you are using, there should be an option somewhere to 'show hidden files'
How about starting the editor from a command line with the filename as an argument, does that work?
I have no idea how to do that!
(OT - I used to watch a cartoon called Count Duckula - is your name related to that?)
nobody - I tried ls, but the file didn't show up. What is pico, a plain text editor? I'm using Gnome, but .htaccess files still don't show up when checking the show hidden files box.
sonjay - that would work when I'm creating a new file, but won't help when I need to edit an existing one. I might be able to edit the file on the server through gftp. It usually takes me a while to figure out how to write a new mod_rewrite though, so I don't know if it would be a good idea for me to be connected through ftp that long while I figure it out.
I wonder if I need root access to get to htaccess files?
I've never used (or even heard of) gftp, but most ftp editors will let you edit a file on the remote system. You might need to look in the preferences for an option like "Show hidden files" or "Show dot files" or something along those lines. Also with telnet and ssh you can usually edit such files using pico or whatever editor the server has available.
I can tell you that no, you definitely do not need root access to edit an .htaccess file, unless your server is set up in a very unusual manner. The whole purpose of .htaccess files is to let the user for a given site set or change certain configurations for his site without root access.
BTW, I'm usually connected to remote sites via ftp for hours at a time, and I've never run into problems. Again, unless your server specifically puts limits in place, you can sit there with your ftp connection on all day long.
I'll try keeping a local copy of the file as a .txt, working on it that way, then edit the real file on the server once I decide how I want it done.
I'm usually connected to remote sites via ftp for hours at a time, and I've never run into problems
I always just figured it wasn't a good idea because I thought ftp isn't really that secure. That's good to know, because I do tend stay connected for quite a while at a time.
Still, I wish there was a way to view them as easily as I could on my old nt machine. So far I've had to go back to that old computer everytime I've needed to work on an htaccess file.
The security gurus might be able to chime in here on the issue of ftp security, but I'm not aware of any security risk from just keeping an ftp connection open. As far as I know, FTP is only not very secure because it sends everything in the clear with no encryption. That's the case whether your connection is open for five minutes or five days. (Now, running an ftp server on your computer could definitely present a risk, but that's not what you're doing when you ftp in to a remote server.)
If so, Go to Edit > Preferences and select the option "Show hidden and backup files". The files beginning with a dot like .htaccess are usually shown at the end of the listing after the standard files.
You can use Gedit or your favorite text editor to view and edit the file.
Is that what you're looking for?
I did find a way to do it though, through gFTP, on my computer I can right click and choose edit too, it opens in gedit and I was able to save it that way.
encyclo - yes, you are right, Nautilus - I'm new to linux and don't have the terminology quite right yet.
"Edit > Preferences etc..."
I had tried that and the file still didn't show up, and still isn't on most of my web sites. But now it is showing up for the one I was working on most recently. Not sure why that is. Maybe when I copied the files originally and moved them to this computer the .htaccess files didn't make it for some reason? I believe I did download a copy from the server to this computer today for the one site that it does now show for. So maybe they weren't there to begin with, but they should have been because I copied all files from my web sites and moved them to this computer a while back.
And its good to know I can use Gedit for it. I didn't know which editor to use for certain that wouldn't cause line ending problems or something of that sort. I knew I could use notepad (as opposed to Word) on windows, but wasn't sure yet on linux.
Thanks, sorry if it ended up sounding like a silly question.
That's right.. the security issue is not in being connected, but in transferring data, as anyone sitting in the middle of that connection can intercept and view (or change) what's happening. Even more importantly, you're sending your username and password in plain text, so establishing an FTP connection is the most vulnerable portion of the process.
You may want to look into SFTP and/or SCP. Both of these run over SSH.
I had tried that and the file still didn't show up, and still isn't on most of my web sites. But now it is showing up for the one I was working on most recently. Not sure why that is. Maybe when I copied the files originally and moved them to this computer the .htaccess files didn't make it for some reason?
If you couldn't see the .htaccess file when you downloaded the site, you wouldn't have selected it, and thus it wouldn't have been copied. Downloading it again for each site should fix that problem.
Also, perhaps you're more familiar with "nano" than "pico"? They're basically the same thing (nano is the GNU version/fork of pico), but I'm pretty sure you have used nano at least while installing Gentoo. It may be a good idea to open a terminal and use the shell for a while to get used to how things work, especially if you're running Gentoo, which requires more of that low-level knowledge.
Just don't "su -" to root unless you absolutely have to, since it's much easier to screw up your system from the shell...