GNU bug report logs - #19447
chmod - problem

Previous Next

Package: coreutils;

Reported by: Tom <oldtommy <at> gmx.at>

Date: Fri, 26 Dec 2014 20:07:02 UTC

Severity: normal

Tags: notabug

Done: 19447 <at> debbugs.gnu.org

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 19447 in the body.
You can then email your comments to 19447 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 bug-coreutils <at> gnu.org:
bug#19447; Package coreutils. (Fri, 26 Dec 2014 20:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tom <oldtommy <at> gmx.at>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 26 Dec 2014 20:07:02 GMT) Full text and rfc822 format available.

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

From: Tom <oldtommy <at> gmx.at>
To: bug-coreutils <at> gnu.org
Subject: chmod - problem
Date: Fri, 26 Dec 2014 19:28:04 +0100
Hi

chmod does not work recursively. The command

chmod --recursive --verbose a-x ./*.txt

only has effects in the actual working directory, but not in the 
subdirectories.

Cheers,
Tom




Information forwarded to bug-coreutils <at> gnu.org:
bug#19447; Package coreutils. (Sat, 27 Dec 2014 01:20:02 GMT) Full text and rfc822 format available.

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

From: Pádraig Brady <P <at> draigBrady.com>
To: Tom <oldtommy <at> gmx.at>, 19447 <at> debbugs.gnu.org
Subject: Re: bug#19447: chmod - problem
Date: Sat, 27 Dec 2014 01:19:30 +0000
tag 19447 notabug
close 19447
stop

On 26/12/14 18:28, Tom wrote:
> Hi
> 
> chmod does not work recursively. The command
> 
> chmod --recursive --verbose a-x ./*.txt
> 
> only has effects in the actual working directory, but not in the 
> subdirectories.

You're passing only .txt files to chmod here
so the --recursive option in ineffective here.
You probably want something like:

  find . -name '*.txt' -print0 | xargs -r0 chmod --verbose a-x

cheers,
Pádraig




Information forwarded to bug-coreutils <at> gnu.org:
bug#19447; Package coreutils. (Sat, 27 Dec 2014 01:25:02 GMT) Full text and rfc822 format available.

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

From: Bob Proulx <bob <at> proulx.com>
To: Tom <oldtommy <at> gmx.at>
Cc: 19447 <at> debbugs.gnu.org
Subject: Re: bug#19447: chmod - problem
Date: Fri, 26 Dec 2014 18:24:08 -0700
tag 19447 + notabug
close 19447
thanks

Hello Tom,

Thank you for your bug report.  Trying to help and improve the tools
is always appreciated.  However it seems there is a misunderstanding.
Therefore I am marking the bug closed as housekeeping for the ticket
system.  However please lets discuss the problem in this bug ticket
until it all makes sense.  Others having the same confusion can read
it and it will help them later.

Tom wrote:
> chmod does not work recursively. The command
> 
> chmod --recursive --verbose a-x ./*.txt
> 
> only has effects in the actual working directory, but not in the
> subdirectories.

In the above you did not specify any subdirectories to chmod.  At
least I assume that all of your *.txt files are files and not
directories.  If a directory was named foo.txt and it was a directory
then of course that would be a named argument and it would be a
directory and it would recurse down it.  In order for --recursive to
make sense at least one of the arguments must be a directory.  You
can't recurse down through a file.

I could say much more but this is actually an FAQ.  Here is the FGA in
response to it.  Please let us know if this answers your questions.

  http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Why-doesn_0027t-rm-_002dr-_002a_002epattern-recurse-like-it-should_003f

Meanwhile, this is prehaps the useful command you wanted.  Try it.  It
is POSIX standard and would work on any POSIX system.

  find . -name '*.txt -exec chmod a-x {} +

If you wanted --verbose as in your question then:

  find . -name '*.txt -exec chmod --verbose a-x {} +

Again please let us know how we could improve the documentation or
whatever in order to make understanding what is happening easier.

Bob




Added tag(s) notabug. Request was from Bob Proulx <bob <at> proulx.com> to control <at> debbugs.gnu.org. (Sat, 27 Dec 2014 01:25:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 19447 <at> debbugs.gnu.org and Tom <oldtommy <at> gmx.at> Request was from Bob Proulx <bob <at> proulx.com> to control <at> debbugs.gnu.org. (Sat, 27 Dec 2014 01:25:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 24 Jan 2015 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 153 days ago.

Previous Next


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