http://www.jtpfxp.net/ Tutorial - Dir Locking - UNIX Advanced

Dir Locking - UNIX Advanced

Updated: 01-14-02
by Ripnhammer

  1. Introduction
  2. Necessary Tools
  3. Getting Started
  4. The Escape Character
  5. Using Your Protected Path
  6. Breaking Your Protected Path
  7. Closing Notes

Introduction

Like all dir locking and breaking it is never really more advanced, when you know what to do it is really very simple. So this tutorial is not actually advanced, I’d say it is more precise. It concentrates on one OS and technique in particular. We will concentrate on one character that is fantastic for making locked dirs on UNIX boxes.

I’ve picked up most of this information on Net Knowledge Base. It is a fantastic forum with extremely friendly members. By either asking the questions myself, reading others questions or reading the tutorials posted I have compiled this information. I wrote it all out in my own words to avoid any plagiarism and create a tutorial similar in style to the ones previously posted on this site.

Necessary Tools

  • FlashFXP - A great ftp client designed with the FXP Groups in mind.

Getting Started

First thing you need is a good pub to test stuff out on. In this tutorial we will be working with a UNIX. So head over to your local FXP board and find a UNIX pub. Since UNIX and NT have different file systems, locking directories on NT is completely different and is covered in Dir Locking - NT Basics. Once you have a pub, load FlashFXP and connect to it, then go to the pub directory, this is where you have access to create and remove directories and files.

*NOTE: Turn on logging in FlashFXP. This will make it a lot easier to break your locked dirs and help you remember how many special characters/spaces you have used.

The Escape Character

*NOTE: In this section all directory names can be replaced with whatever you want unless otherwise specified. The special characters are what's important, not the folder names.

If you hold down [Alt] and press [1] then [5] then [2] (not all at once) this character will appear: ˙.  This is referred to as [Alt+152].  In case you're not familiar with Alt keystrokes, you must use the numpad (numbers on the right side of the keyboard) when doing these commands.

*NOTE: If you are having problems where Alt+152 is not doing anything try Alt+0255.  I have had reports where in some non-US character sets 152 does NOT work but 0255 does.

This is the magical character. On NT machines this does nothing, it is just like any other character. However, on UNIX machines ˙ is an escape character.

There are three variations of ways this character can be handled. These three different outcomes depend on the type of UNIX the server is running on. They may all be UNIX Type L8 but may just be off a different build with different settings. You will just have to experiment. There are possibilities I missed so you will probably find slight variations.

  1. No matter how many ˙’s you put only one ˙ will be displayed.
     
    • Make the directory: /pub/˙˙foldername˙˙/
      • It will appear as: /pub/˙foldername˙/

    If you wish to create a directory within: /pub/˙˙foldername˙˙/ then then right-click, Make Folder and input
     

    • Make the directory: /pub/˙˙foldername˙˙/foldername
      • It will appear as: /pub/˙foldername˙/foldername
         
  2. No matter how many ˙’s you put only one ˙ will be displayed. However, the letter after the ˙ will be removed.

  3.  
    • Make the directory: /pub/˙˙foldername˙˙/
      • It will appear as: /pub/˙oldername˙/
    • Make the directory: /pub/˙fol˙der˙name˙/
      • It will appear as: /pub/˙ol˙er˙ame˙/

    If you wish to create a directory within: /pub/˙˙foldername˙˙/ then then right-click, Make Folder and input
     

    • Make the directory: /pub/˙˙foldername˙˙/foldername
      • It will appear as: /pub/˙oldername˙foldername

    Yes, the two dirs merged! But the next folder you make won’t merge so right-click, Make Folder and input
     

    • Make the directory: /pub/˙˙foldername˙˙/foldername/foldername
      • It will appear as: /pub/˙oldername˙foldername/foldername
         
  4. In this case one ˙ will be removed in each location that they are present in the folder name. Therefore, if only one ˙ is used then it will be removed along with a letter. If two ˙’s are used, only one ˙ will be removed along with a letter.
     
    • Make the directory: /pub/˙˙foldername˙˙/
      • It will appear as: /pub/˙oldername˙/
    • Make the directory: /pub/˙fol˙˙der˙name˙/
      • It will appear as: /pub/ol˙erame/

    If you wish to create a directory within: /pub/˙˙foldername˙˙/ then then right-click, Make Folder and input
     

    • Make the directory: /pub/˙˙foldername˙˙/foldername
      • It will appear as: /pub/˙oldername˙/foldername

Now you should be realizing why this is a powerful tool for locking dirs on UNIX. The ˙ character, excuse my French, fucks everything up. Folders display completely differently from what you initially inputted and thus makes it difficult to change unless the initial directory is known. Take that deleters!

Using Your Protected Path

This character is weird and different machines with different builds of UNIX respond differently. On some machines you will be able to upload and download perfectly from your protected path. If this is the case you can ignore this section until you stumble upon a different machine.

You might not be able to upload directly to your protected path, in that case, upload your stuff to another unprotected folder then when it is finished just move your uploaded files into your protected path.

Secondly, you might be able to download files from the protected path but you may not be able to download any of the folders within it. So in your post make sure to specify to only download the files and not the folders they reside in.

Breaking Your Protected Path

To change your amazing new protected path you have to use the rnfr/rnto raw commands. Click on Commands then go to Raw Command (quote). Enter “rnfr /your/original/protected/path” then go to Raw Command (quote) again and this time enter “rnto /your/new/unprotected/path”.

Example:

  • rnfr /tag/˙˙˙404˙˙˙/fxp
  • rnto /tag/404/fxp

You should have no trouble renaming it as long as what you enter the first time is exactly what you entered to create your original protected path. That is why it is a good idea to make sure u have your FTP client creating a log file of your actions (FlashFXP logs your actions to “FlashFXP.log” in the FlashFXP installation folder).

If you need more advanced dir breaking info check out Dir Locking - Breaking Dirs.

Closing Notes

If you are getting access denied when trying to remove directories, whether they are locked or not, it is usually because there is something still in the folder or your not entering the right number of ˙’s. For files if you're getting access denied it is because the file is in use, either being uploaded or downloaded. If you have made sure your folder is empty then you might not be able to remove it because someone may be in it. In that case you will just have to play the waiting game.

< Back to TOC - Forum - Contact Info >