Shriphani Palakodety

In Pursuit Of Truth and Beauty

Shriphani Palakodety header image 2

Hard-linking directories? It’s possible

September 3rd, 2007 · No Comments · Storage

Let us face it, no matter how geeky we are or how computer-aware, hardlinks to directories need to be banned. But, I don’t really care, I want to be able to use hardlinks on directories. The BSDs did bring about symbolic links but a simple rsync from your free shell directory to your PWD ( presently working directory ) will tell you why.

I was told one of the “cracker” tricks for Linux which takes for granted that the user is geeky and dumb (possible – but I haven’t seen a species as yet). Mr. Saifi told us about hard-linking /etc/passwd into our $HOME. Try running a chown on you dir and there goes security down the bin……

Why do these problems occur. Because the very presence of symbolic links has made hardlinks obscure. Sysadmins no longer care about hardlinks – they just keep doing trash work forgetting about hardlinks. But one filesystem plans to change it all ! GCFS – Garbage Collection FileSystem. It claims that it does allow hardlinking of directories but I was confused about what it would do to the tree like structure of the filesystem once one allowed hardlinks. What about the possibility of infinite looping courtesy carelessness ?

From the GCFS homepage, I got to know that GCFS does away with the tree like structure, allows linking a directory to a subdirectory and whatnot.

Some users may be perplexed by Meta-characters like “.” and “..” which we cannot do without. The thing is that in GCFS, the path you traced while reaching your $PWD is remembered and “cd ..” should take you to the previously inhabited directory and not necessarily the first hardlinked directory.

Right, till next time, goodbye !

Tags:

No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment