Re: chmod, chgrp and symlinks

From: Kasper Dupont (
Date: 02/05/03

From: Kasper Dupont <>
Date: Wed, 05 Feb 2003 11:30:58 +0100

Ramazan Jah-Far wrote:
> Hardlinks are a pain in ass anyway. Considering all
> said above, hardlinks turn to be a sort of design
> flaw. IMO.


> Think what will happen when someone make hardlink of
> every file in $dir:
> KD> and to prevent chmod on hardlinks you could use:
> KD> find $dir -type f -links 1 -name '*.mp3' -print0 | xargs -0 chmod 640
> This will _prevent_ the very sense of the script :),
> i.e. will cause DoS.

Is that really a major problem? Doesn't sound to me like
the script is that important, to me it sounds more like
just a convenience instead of doing it by hand every now
and then.

But if it really is that necesarry, the directory could
be made on a seperate filesystem. Then you don't have
to care about hardlinks, because hardlinks between
filesystems is not possible. Just remove the -links test
from the find command, and it will work as intended. In
some cases it would be nice to prevent hardlinks even
between subtrees of the same filesystem, in particular
in combination with directory quotas. Does anybody know
a filesystem implementing such a thing?

Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use

Relevant Pages

  • Re: ext2 Partition auf block-level kopieren
    ... Rein auf die Anzahl der Dateien bezogen ist das fast unendlich viel da es jedes Backup Verzeichnisse mit mehreren Tausend Dateien enthält die nur per hardlinks verknüpft sind. ... das wird dann wohl nicht gehen, denn das Filesystem hat dann genau die ...
  • Re: chmod, chgrp and symlinks
    ... >> i.e. will cause DoS. ... KD> Is that really a major problem? ... KD> be made on a separate filesystem. ... KD> In some cases it would be nice to prevent hardlinks even ...
  • Re: chmod, chgrp and symlinks
    ... know if all hardlinks are inside that tree. ... > KD> be made on a separate filesystem. ... symlinks to remove a symlink to a directory. ... so are user quotas. ...
  • very poor ext3 write performance on big filesystems?
    ... TB doesn't make this filesystem that big, but 200 millions of files is a decent number. ... Most of the files are hardlinked multiple times, ... Recently I began removing some of unneeded files (or hardlinks) and to my surprise, it takes longer than I initially expected. ... I see up to 5000 kB read/write from/to the disk, wa reported by top is usually 20-70%. ...
  • Re: Linking Files: Hard Link vs. Soft Link?
    ... because symlinks work across filesystems, and KDE only does symlinks, so ... detection to prevent infinite loops when walking the filesystem. ... a lot simpler to disallow multiple hardlinks to directories (with the ...