Linux

How to Anonymous ftp Server Configuration

Fadıl

We will use only anonymous ftp and will not allow any non-anonymous user any access. Here we describe the anonymous ftp server setup that allows anonymous uploads. Any self-respecting guide on the subject will tell you that “this is a bad thing”. But how is it worse than allowing users to FTP from untrusted location and transfer their passwords in clear text? Not everybody (especially, using Windows) can easily setup an FTP tunnel via ssh.

Setup User Authentication on Certain Page

Fadıl

If you want to have your website have user/password restrictions, you must have Apache installed and running. There are only 2 steps to this:

1. create a file with user names and passwords
2. tell the server what you want to be protected and which users are allowed

For the first step, you will use the program htpasswd. It creates a user file and can add or modify users. For security reasons, you should not create the file under the root directory. For example, made it under /usr/local/etc/httpd/ and will use this to show examples. To create a new user file and add the username “xyz” with  the password “abc123” to the file /usr/local/etc/httpd/users:

Installing a New Hard Disk and Copying the Files

Installing a New Hard Disk and Copying the Files

Fadıl

Formatting the new disk

Use the following command to format Linux partitions using ext2fs on the new disk:

mkfs.ext2 /dev/hdb1

To check the disk for bad blocks (physical defects), add the -c option just before /dev/hdb1.

If the new disk will have more than one Linux partition, format the other partitions with mkfs.ext2 /dev/hdb2, mkfs.ext2 /dev/hdb3, and so on. Add the -c option if desired.

Note: With older distributions, the command mkfs -t ext2 -c /dev/hdb1 didn’t check for bad blocks under any of Red Hat, Debian or Slackware, contrary to what the man page stated. This has now been fixed.

Changing Ownership Of A File Using Chown

Fadıl

Recently I encountered a problem when I ftped to my server, I was trying to upload a file that already existed under my username on the server, and I kept getting a 550 error. Which for you newbies out there is a file permission error, telling me that I do not have rights to write over or delete those files under my username.  That made me mad, I didn’t know what was going on I thought my FTP server was messed up.  Then we figured out that the problem could have been who owned the files.  Surely enough, the files were owned by root instead of a pinhead which was the username I was under.  If your files under your username are owned by root then that will allow your file permissions to be limited and you not to be in control of them.  So how do we fix all this?

How to install ssh on Linux?

Fadıl

Building and Installing SSH

For most Unix systems, the installation of SSH is pretty straightforward. Simply download the GNU-zipped tar file from one of the FTP mirror sites listed at http://www.ssh.fi/sshprotocols. (Note: Typically there’s a new version of SSH released every few months.) In order to compile SSH, you need an ANSI C compiler such as gcc. The simplest way to build this software is to do the following:

# ./configure

# make

# make install

The configure script should recognize your system type, discover important information about your build environment, and–if everything checks out–create a corresponding Makefile. The make program uses this Makefile to build the software. The make install directive installs the SSH components and man pages in the right places and generates the initial 1024-bit host key pair (if it doesn’t already exist).