From owner-freebsd-questions Wed Feb 13 9:25:44 2002 Delivered-To: freebsd-questions@freebsd.org Received: from sage-american.com (sage-american.com [216.122.141.44]) by hub.freebsd.org (Postfix) with ESMTP id A663937B416 for ; Wed, 13 Feb 2002 09:25:39 -0800 (PST) Received: from SAGEONE (adsl-64-219-30-1.dsl.crchtx.swbell.net [64.219.30.1]) by sage-american.com (8.9.3/8.9.3) with SMTP id LAA24800; Wed, 13 Feb 2002 11:25:32 -0600 (CST) Message-Id: <3.0.5.32.20020213112530.0196bec8@mail.sage-american.com> X-Sender: jacks@mail.sage-american.com X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Wed, 13 Feb 2002 11:25:30 -0600 To: "Malan Joubert" , freebsd-questions@FreeBSD.ORG From: jacks@sage-american.com Subject: Re: symbolic links on ftp In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ouch! Don't go experimenting with 'root'...!! Always use a test file or directory. Her's a brief on sym links: **************** Understanding the location of linked directories There is a subtle difference between a "normal" directory and a directory created with a symbolic link to another directory. What happens if you do a cd (change directory) to this type of directory? You are placed in the directory that the symbolic link points to. This can be confusing, especially if you have changed your shell prompt so that it displays the current working directory. Look at this example: pwd (print the user's working directory) /usr/home/john/tmp ln -s $HOME/accounts/may fifth (use a symbolic link named fifth that points to the directory $HOME/accounts/may) ls fifth cd fifth (change directory to the new directory) pwd (print the working directory) /usr/home/john/accounts/may (the user is actually in the the directory that the linked directory points to) When the user does a cd (change directory) to the symbolically linked directory may in their current working directory, they change to the directory that this link points to, the directory /usr/home/john/accounts/may. Examples of using the ln -s command To make a symbolic link from a file in one subdirectory to a file in another subdirectory: ln -s reports/reportA publications/my_report This makes a symbolic link between the file reportA in the subdirectory reports and the filename my_report in the publications subdirectory. ---------------------------------------------------------------------------- ---- To make a symbolic link to a file in a subdirectory to your current working directory: ln -s docs/editors/vi.ref . This makes a symbolic link between the file vi.ref in the subdirectory docs/editors/ to the filename vi.ref in the current working directory. At 07:11 PM 2.13.2002 +0200, Malan Joubert wrote: >Hi >I am trying to set up an FreeBSD ftp. >It's totally unsecure (read + write on incoming) as it's only going to be >used on my LAN but I can't get all of it going: >How do symbolic links work? I want to link the /cdrom directory to be shared >via ftp is this possible? >I did a ls -s and managed to link my / to the ftp directory something which >I immediately tried to undo:( I did the following: >cd /var/ftp >rm -R / >Noooooooooo!!!!!!!!!! It killed my root so at the moment my box is busy >reinstalling!!!!!!!!! >Anyone care to explain links to me, I tried the manual but it doesn't really >say anything... > >Bye + Thanx >Malan Joubert > > >_________________________________________________________________ >Chat with friends online, try MSN Messenger: http://messenger.msn.com > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message > > Best regards, Jack L. Stone, Server Admin =================================================== Sage-American http://www.sage-american.com jacks@sage-american.com "My center is giving way, my right is in retreat; ....situation excellent! ....I shall attack!" =================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message