Linux Directory Access Problem: Permission Denied

linuxpermissionsUbuntu

I'm attempting to run the command

username> ls -al var/

But I get the exception

ls: cannot open directory var/: Permission denied

When I check the permission of the directory I see

drwxr-x--x  6 sysuser abbagroup   4096 2010-07-28 11:55 var

I've confirmed that my user account is part of the group

> groups username
username: abbagroup

So why can't I run the command?

Best Answer

Did you by any chance just add username to abbagroup? This kind of change takes effect when you log in, and applies to the login process and its descendants.

When you run groups username, it tells you which groups username would belong to if (s)he logged in. Run groups with no argument instead, so that it tells you which groups the current process belongs to. If that doesn't show abbagroup, you need to log out and back in.