users and groups help

Kevin O'Gorman kogorman at gmail.com
Sat Sep 24 15:03:42 UTC 2011


Synopsis: clarify 'chmod' usage

On Sat, Sep 24, 2011 at 7:18 AM, Ioannis Vranos <ioannis.vranos at gmail.com>wrote:

> Minor corrections:
>
>
> On Sat, Sep 24, 2011 at 4:53 PM, Ioannis Vranos
> <ioannis.vranos at gmail.com> wrote:
> >> On Sep 24, 2011 12:34 AM, "Knute Johnson" <ubuntu at knutejohnson.com>
> wrote:
> >>
> >> I've found something I thought I understood but now I don't.  I have a
> >> directory that is chmod 770 and owned by camera:camera.  I have made
> myself
> >> a member of the group camera.  Should I not be able to cd into the
> >> directory?
>
>
> ==> No, chmod 770 is equivalent to chmod u=rwx,go=
>

No it's not.  It's equivalent to chmod ug=rwx,go=


>
>
> > If you want the group to have read/write access to the directory, and
>
> ==> be able to see the directory when listing files and directories, you
>
> > should give as root:
> >
> > chmod g=rwx DirectoryName
>
> or
>
> > chmod g+rwx DirectoryName
>
> This should not be necessary.  Follow the other advice about running in a
new login after changing group membership.

To verify the chmod usage, observe:

% touch x
% chmod 0 x
% ls -l x
---------- 1 kevin kevin 0 2011-09-24 07:59 x
% chmod 770 x
% ls -l x
-rwxrwx--- 1 kevin kevin 0 2011-09-24 07:59 x
% chmod u=rwx,go= x
% ls -l x
-rwx------ 1 kevin kevin 0 2011-09-24 07:59 x
% chmod ug=rwx,o= x
% ls -l x
-rwxrwx--- 1 kevin kevin 0 2011-09-24 07:59 x
%

So the gamera group had all permissions, but the current login wasn't in the
camera group.

-- 
Kevin O'Gorman, PhD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110924/8ba44709/attachment.html>


More information about the ubuntu-users mailing list