Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Duplicate owner permissions to group

1 view
Skip to first unread message

Jason

unread,
May 1, 2006, 8:16:01 PM5/1/06
to
Is there an easy way to duplicate owner permissions to the group?
ie 730 -> 770, 404 -> 444

- Jason


Pascal Bourguignon

unread,
May 1, 2006, 8:25:37 PM5/1/06
to
"Jason" <noad...@email.com> writes:

> Is there an easy way to duplicate owner permissions to the group?
> ie 730 -> 770, 404 -> 444

I use something like:

find "$dir" ... \
-exec chmod g-rwx {} \; \
\(
\( -perm -0100 -exec chmod g+x {} \; \) -o \
\( -perm -0200 -exec chmod g+w {} \; \) -o \
\( -perm -0400 -exec chmod g+r {} \; \) \
\)

For one file, you could use:

chmod $(stat -c %a ${file} | sed -e 's/\(.\)\?\(.\).\(.\)$/\1\2\2\3/') ${file}

--
__Pascal Bourguignon__ http://www.informatimago.com/

PUBLIC NOTICE AS REQUIRED BY LAW: Any use of this product, in any
manner whatsoever, will increase the amount of disorder in the
universe. Although no liability is implied herein, the consumer is
warned that this process will ultimately lead to the heat death of
the universe.

Barry Margolin

unread,
May 1, 2006, 8:41:49 PM5/1/06
to
In article <e368b3$qda$1...@news1.cse.ohio-state.edu>,
"Jason" <noad...@email.com> wrote:

> Is there an easy way to duplicate owner permissions to the group?
> ie 730 -> 770, 404 -> 444

chmod g=u filename

--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

Jason

unread,
May 1, 2006, 8:46:02 PM5/1/06
to
Wow. Not only was that easy, it was the fastest reply ever. Thanks.

"Barry Margolin" <bar...@alum.mit.edu> wrote in message
news:barmar-18CFC4....@comcast.dca.giganews.com...

0 new messages