(E-Mail Removed) wrote:
>Hi all,
>
>I'm pretty new to Linux and looking for some help with file
>permissions.
Great! The first thing you need to know about is *RTFM*. (and
despite rumors, the "F" is not "Fine"...)
It would actually be a good idea to spend a few hours looking at
the man pages for virtually everything that is in /bin and
/sbin, just to find out what can be done. You don't need to
remember details, but it's nice to have some idea where to
start.
For example, the answers to your questions are relatively easy
to get by simply reading the man pages for "chmod" and "find".
>I have a folder called Folder1. Folder1 has other folders and files
>inside it.
Actually what you have is a _directory_ named "Folder1", which
contains other directories as well as files.
>I'd like to amend the permissions for Folder1 and everything inside it
>so that everyone has read/write access.
>
>Is it possible to do this with one command?
Easy.
chmod -R 777 /path_to/Folder1
No that you necessarily want to do it the easy way though! That
also makes every file executable, which you probably don't want.
But you do want that bit set for all of the directories (on
directories the execute bit allows access).
So the question then becomes how to distinguish between files
and directories as things get changed. The /find/ program makes
that almost easy.
First, set permissions as needed on all of the directories and
sub-directories,
find /path_to/Folder1 -type d -exec chmod 777 {} \;
Then change all of the files to the desired permissions,
find /path_to/Folder1 -type f -exec chmod 666 {} \;
*Do* read at leasst the man pages for both /chmod/ and for
/find/ before doing that.
--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)
(E-Mail Removed)