From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Lagerwall Subject: Trailing slash with symlinks and rmdir/rename Date: Mon, 9 Sep 2013 23:08:50 +0200 Message-ID: <20130909210850.GA9694@hobo> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: linux-kernel@vger.kernel.org, Alexander Viro To: linux-fsdevel@vger.kernel.org Return-path: Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi, I have noticed that if X is a symlink to a directory Y, doing "rmdir X/" or "mv X/ Z" does not behave how I expect. My reading of POSIX 2008 (and the behaviour of FreeBSD and OpenIndiana) is that a symbolic link to a directory followed by a trailing slash should behave as though it names the directory pointed to by the symbolic link. So while Linux gives ENOTDIR for "rmdir X/", the others remove Y. Is this a bug? If it is, I can have a go at writing a patch. Regards -- Ross Lagerwall