|
File and Directory Permissions and Transfer
Modes
Chapter 3-3-3 ROCKCI
DIY Virtual Server Features
File
and Directory Permissions and Transfer Modes
Directory and file names
The operating system (FreeBSD) is CaSe SeNsItIvE. In other words, the
file name "joe.html" is NOT the same as "JOE.html". If your HTML code references
a joe.html, but the actual file name is in uppercase, a File Not Found
error will occur. This also applies to directory names. To prevent errors,
name all files in lowercase. Spaces and special control characters are
usually not a good idea. The underscore character ("_") is acceptable.
You should avoid special characters (eg. ! @ # $ % ^ & * : ') in file
and directory names. The tilde (~) cannot be used in directory or file
names.
Setting File permissions
For .html and .gif pages most beginners will be fine
with the default file permissions. However for cgi programs and other programming
the user should be aware of how to set file permissions.
ROCKCI DIY Virtual servers
support file (chmod) commands in Cute FTP and WS_FTP. You can also shell
in and set permissions the old fashioned way.
Files types commonly used for Web sites
!!!
It is important to understand the file type
(Binary or ASCII) you are dealing with when transferring files to your
ROCKCI DIY Virtual Server. Be careful with Automatic transfer mode.
This mode will select the wrong mode (Binary or ASCII) if your FTP client
is not set up properly to know the difference. !!!
.html or .htm files - These files, called Web pages,
are written in HyperText Markup Language (HTML). These
files are in ASCII format.
.gif files - GIF files are graphics or image files
with 256 unique colors or less. Two popular types of GIF files are animated
GIFs, which contain multiple frames played back to produce animation, and
interlaced GIFs, which allow for a color to be transparent to produce dramatic
affects with other images in the background. These
files are in BINARY format.
.jpeg or .jpg files - JPEG files are usually used
for photographs and can contain up to 16 million colors, When creating
JPEG files you can set the "quality level" which allow you to reduce the
file size for faster loading. These files
are in BINARY format.
.mid or .midi files - MIDI (Musical Instrument
Digital Interface) files containing
a digital number sequence of musical tones and
instruments which can be played backed with a client MIDI player (built-in
to most web browsers). These files are in
BINARY format.
.wav files - these are sound or audio files signals
used for recording and playing music an voice audio with a computer.
can be played backed with a client wav player (built-in to
most web browsers). These files are in BINARY
format.
.ra files - REAL AUDIO these are sound or audio
files signals used for recording and playing music an voice audio with
a computer. can be played backed with a client Real Audio player (built-in
to most web browsers). These files are in
BINARY format.
Tips
Transfer your files using the proper mode.
It is important to understand the file
type you are dealing with when transferring files to your ROCKCI DIY Virtual
Server and set the file transfer mode properly in your FTP client. Otherwise,
files will not load properly into a browser. Make sure you use ASCII mode
for .html, .txt, .cgi files and BINARY mode for .gif, .jpg files.
Powered by ROCKCI DIY
Virtual Servers
|