Forum Moderators: mack

Message Too Old, No Replies

.htaccess

Chmod

         

JuliaS at work

7:00 pm on Feb 1, 2008 (gmt 0)

10+ Year Member



Hi there.

Hard at work creating a website for a charity - a volunteer effort (I'm not a web designer).

The site is nearing completion and I've created a custom 404 error file.
I've created and uploaded the .htaccess file and it is functioning correctly (pulling up the correct file when I create a 404 error).

However, when I view the directory that it's in, it's not there (does not appear in the file list), which is making it impossible to, for example, check the permissions (RW-R--R--).

Any ideas why it's not showing on the server?

Thanks SO much for any input!

Julia

[edited by: JuliaS_at_work at 7:13 pm (utc) on Feb. 1, 2008]

jtara

7:32 pm on Feb 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am assuming you are on a Linux host.

I don't know how you are looking at the directory - from a shell or with an FTP program?

By default, the Linux "ls" command does not list files that begin with a ".". Use "ls -a" to show all files, including those that begin with a ".". To see all files, and their permissions, use "ls -la".

This is a historical feature. Files beginning with a "." are generally configuration files of some sort, and at one time the thought was that ordinarily users wouldn't want to see these.

Now it is a jumble whether or not configuration files start with a ".", and there are also all sorts of "data" files and directories that being with a ".".

It certainly is confusing, even for a seasoned Linux user. There's not much sense or consistency to it.

If you are using an FTP program, you will need to investigate the options in your FTP program to see how to make it show you files beginning with a ".". Most FTP programs will show you all files by default.

JuliaS at work

8:48 pm on Feb 1, 2008 (gmt 0)

10+ Year Member



Thank you jtara,

Yes - it is a Linux host. Sorry I left that out.

I suppose it's my FTP program that won't allow me to see it - took a look around at the options and can't find anything I can set to ask that it "show all" files.
Perhaps it's time for a newer FTP program! ;-)

Thanks again,

Julia

rocknbil

5:00 pm on Feb 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll probably never need this - but if you want to download a file that's invisible via your FTP client, you hit the download button without selecting a file. You will be prompted to enter the name of the file, and you can enter .htaccess.

The same is true of executing commands via FTP, site [command] [filename] works on files that are invisible via FTP (or quote [command] [filename]).

However, you shouldn't *have* to set permissions on an .htaccess file.

JuliaS at work

5:57 pm on Feb 2, 2008 (gmt 0)

10+ Year Member



Way cool, Rocknbil!

My backup will need to know this, as I can't yet give her access to the domain, but want her to learn about and be able to access the .htaccess file.

Also (duh me!) discovered by accident that I can see the .htaccess file through the web control panel. (too busy to THINK lately! LOL)
You're right - it already has the right permissions.

Thanks very much.