bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature request for chmod


From: Jim Meyering
Subject: Re: feature request for chmod
Date: Wed, 19 Feb 2003 17:28:34 +0100

Tjabo Kloppenburg <address@hidden> wrote:
> I couldn't find a fileutils homepage with a bug or feature tracker.

I won't be making any more releases of the package called the `fileutils'.
All of those tools (along with those from textutils and sh-utils) are now
part of a new package called the GNU coreutils.

  ftp://alpha.gnu.org/gnu/coreutils/coreutils-4.5.7.tar.bz2

The home page is here:
  https://savannah.gnu.org/projects/coreutils/

The FAQ is still here:
  http://www.gnu.org/software/fileutils/doc/faq/

> But I want to suggest a feature for chmod:
> Very often I have to change permissions of directories with subdirectories,
> but I want to have different mods for files and directories.

If the `x' bit it the one you're concerned about, then the `X' symbolic
attribute may well already do what you want.  From the texinfo documentation:
(i.e., if you have the coreutils documentation installed, run this command
`info file sym cond' and you'll get this:


    Conditional Executability
    -------------------------

       There is one more special type of symbolic permission: if you use
    `X' instead of `x', execute permission is affected only if the file
    already had execute permission or is a directory.  It affects
    directories' execute permission even if they did not initially have any
    execute permissions set.

       For example, this mode:

         a+X

    gives all users permission to execute files (or search directories) if
    anyone could before.


If you want something more general, then you'll have to use find+xargs
as described in at least one of the FAQ entries.

I hope you don't mind that I've forwarded this to the list, in case
it helps someone else later.

> I can think of two possible ways how I would like to call chmod:
> A - find like file type option:
> chmod -R -type f 660 .
> chmod -R -type d 775 .
>
> B - defining mods for files and dirs in the same command line:
> chmod -R -t 660 -d 775 .
>
>
> Is this a thinkable feature of a future version of chmod/chgrp/...?
> I hope so. :-)
>
> thanks for your patience,
>   tjabo kloppenburg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]