GNU bug report logs - #5548
eshell has an odd idea of file permissions

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Mon, 8 Feb 2010 23:55:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5548 in the body.
You can then email your comments to 5548 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5548; Package emacs. (Mon, 08 Feb 2010 23:55:02 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: eshell has an odd idea of file permissions
Date: Mon, 08 Feb 2010 18:54:47 -0500
Current trunk on GNU/Linux:

mkdir foo
cd foo
touch 1 2 3 4
chmod 644 1               # writable by owner
chmod 446 2               # writable by other
chmod 744 3               # executable by owner
chmod 447 4               # executable by other

emacs -Q -f eshell
eshell> ls

"1" appears in eshell-ls-readonly face, "2" in default face.
"3" appears in readonly face, "4" in eshell-ls-executable face.

This seems to be due to eshell-ls-applicable, which looks odd to me.

Firstly, it does different things according to whether or not a file's
owner attribute is reported in numeric or string form.

Secondly, if the attribute is a string and the file is not remote (?),
it adds 6 to the index position to be checked, meaning it checks the
"other" file permission index.

For example, to test if a file is readable, it ends up testing
the 1+6=7 th (from 0) character in "-rw-r--r--".




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5548; Package emacs. (Tue, 09 Feb 2010 02:00:02 GMT) Full text and rfc822 format available.

Message #6 received at 5548 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 5548 <at> debbugs.gnu.org
Subject: Re: bug#5548: eshell has an odd idea of file permissions
Date: Mon, 08 Feb 2010 20:58:48 -0500
Glenn Morris <rgm <at> gnu.org> writes:

> Current trunk on GNU/Linux:
>
> mkdir foo
> cd foo
> touch 1 2 3 4
> chmod 644 1               # writable by owner
> chmod 446 2               # writable by other
> chmod 744 3               # executable by owner
> chmod 447 4               # executable by other
>
> emacs -Q -f eshell
> eshell> ls
>
> "1" appears in eshell-ls-readonly face, "2" in default face.
> "3" appears in readonly face, "4" in eshell-ls-executable face.
>
> This seems to be due to eshell-ls-applicable, which looks odd to me.

I've re-written eshell-ls-applicable; it should work properly now.




bug closed, send any further explanations to Glenn Morris <rgm <at> gnu.org> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Tue, 09 Feb 2010 02:00:04 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5548; Package emacs. (Tue, 09 Feb 2010 05:18:02 GMT) Full text and rfc822 format available.

Message #11 received at 5548 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 5548 <at> debbugs.gnu.org
Subject: Re: bug#5548: eshell has an odd idea of file permissions
Date: Tue, 09 Feb 2010 00:17:07 -0500
Great; thank you.




bug archived. Request was from Debbugs Internal Request <bug-gnu-emacs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 09 Mar 2010 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.