[PLUG] Chmod question, before I mess things up

wcooley at nakedape.cc wcooley at nakedape.cc
Sun Dec 20 02:13:12 UTC 2009


> I'm not terribly familiar with permissions, but after reading man chmod
> and a couple web sites, I think I have figured how to do what I want.

A good way to test things like this is to create yourself a sandbox, so
that you can find out if what you're planning will screw things up or not.
You could just make yourself a directory like '/tmp/test', copy or create
a handful of files there, and then play around. It's a lot easier to learn
these things with hands-on practice and faster than waiting around for
responses from a mailing list.

> I wish jjj to have full read, write and execute permissions to every
> file and folder in /home/jjj/. I wish jxj to have the same access to
> the same files because, if I ever need to log in as jxj, it will be
> because I need to fix something in jjj's account. Others need no access
> at all (except for root, of course).
>
> So I am planning to do:
>
> # cd /home/jjj/
> # chmod 644 *
>
> I think that will make every file and folder in /home/jjj/ -rw-rw----.

As you've already been told, no, and particularly surprising would be the
effect of removing the executable bit from your directories.

Here's a script I wrote a while ago because I was having to do this
repeatedly and it was easier to give someone else sudo access to run it
than to teach them the correct chmod command:

http://nakedape.cc/svn/public/trunk/small-projects/sys-utils/fixgrp

Wil





More information about the PLUG mailing list