From: Rhys Hardwick <rhys@rhyshardwick.co.uk>
To: linux-newbie@vger.kernel.org
Subject: Re: Change permissions of files to -xw +r for all other users
Date: Thu, 26 May 2005 20:21:43 +0100 [thread overview]
Message-ID: <200505262021.43348.rhys@rhyshardwick.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.21.0505262026340.1242-100000@hestia>
I was just using chmod. This helps. I can use find to only select files, not
directories, and change the permissions. However, the real question is how
to make chmod not alter the permissions for the files owner, but to remove
write and exectute permissions for group and others. That is the bit that
has stumped me.
Cheers,
Rhys
On Thursday 26 May 2005 19:36, J. wrote:
> On Thu, 26 May 2005, Rhys Hardwick wrote:
> > Hey there,
> >
> > I know this may be a case of RTM, but I am getting confused on it.
> >
> > I want to change the permissions of all the files in my home folder to
> > read only for all users but myself, but to leave directories executable
> > so that they can be opened. I have had difficulty doing this for only
> > other users, and have ended up -xw for myself as well, even tyring many
> > variations of the -o tag. Any help would be fantastic.
>
> What program are you talking about ? The program `find` perhaps ? Or using
> just `chmod` ?
>
> If you want to find any file in the current directory not owned by you
> then:
>
> ~: find . -type f ! -user imyselfandi -maxdepth 1
>
> The `!' exclamation mark means NOT .
>
> If you want to change the permission of all files which were found by the
> previous command you could tell find to exec chmod with the desired
> permissions, for example:
>
> ~: find . -type f ! -user imyselfandi -maxdepth 1 -exec chmod 0744 '{}' \;
>
> Or you could use a command line shell filter:
>
> ~: find . -type f ! -user imyselfandi -maxdepth 1 | while read FILE ; do
> chmod 0744 ${FILE} ; done
>
> Note; the command is actualy one line, the format breaks because of the
> text width in the e-mail message..
>
> Hope this answers your question ...
>
> > --
> > Rhys Hardwick
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
--
Rhys Hardwick
-----------------------------------------------------
| rhys@rhyshardwick.co.uk | www.rhyshardwick.co.uk |
| PGP-id - 0x63AB126D | |
|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
| Windows: Just another pain in the glass. |
*****************************************************
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2005-05-26 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-26 17:44 Change permissions of files to -xw +r for all other users Rhys Hardwick
2005-05-26 18:36 ` J.
2005-05-26 19:21 ` Rhys Hardwick [this message]
2005-05-26 20:50 ` J.
2005-05-27 17:17 ` Rhys Hardwick
2005-05-26 21:00 ` J.
2005-06-09 16:11 ` Stephen Samuel
2005-07-13 11:52 ` oops " Stephen Samuel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200505262021.43348.rhys@rhyshardwick.co.uk \
--to=rhys@rhyshardwick.co.uk \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox