[olug] chown

Chad Homan choman at gmail.com
Wed Sep 8 05:52:07 UTC 2010


Now that I can type....   Real computer....


chown -R <uid>[:<gid>] <mountpoint>
the finds on the previsous post are valid, but to simplify after the above
chown
chmod -R 644 <mount>

then a simply find on dirs
fine <mount> -type d -exec chmod 755 {} \;

the escape is VERY important

Chad, CISSP


On Wed, Sep 8, 2010 at 12:40 AM, Christopher Cashell <topher-olug at zyp.org>wrote:

> On Wed, Sep 8, 2010 at 12:01 AM, Kelly Williams
> <kellywilliams81 at gmail.com> wrote:
> > I have a simple question. I just put a hard drive that I had migrated
> from a
> > old computer and I shared it on my network. is there a way that i can
> change
> > all the permissions of all directories and files instead of doing one at
> > time.
>
> Quickest and easiest way would be something like the following (from a
> command line):
>
> sudo find /mount/point/ -type d -print0 | xargs -0 chmod 775
> sudo find /mount/point/ -type f -print0 | xargs -0 chmod 664
>
> Change '/mount/point/' to the location where your hard drive is
> mounted.  This will change all the directories so they are accessible
> to anyone, and change all the files so they are readable by anyone.
> You can change the 'chmod' command to 'chown' if you want to change
> ownership on the files, too.
>
> I seem to recall that you can mount a filesystem with an option to
> make all files owned by a specific user, too, but I don't remember the
> specifics of it offhand.
>
> > Kelly Williams
>
> --
> Christopher
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug
>



More information about the OLUG mailing list