Linux Directory Access Problem: Permission Denied

12,140

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.

Share:
12,140

Related videos on Youtube

Brig
Author by

Brig

I’m a Data Cloud Solution Architect for Microsoft. This means I help customers design solutions for data in the cloud. I have always enjoyed developing software and learning new technologies. I have a love of learning, a love for teaching, and plenty of curiosity to fill a pool. I’m a hands-on architect who enjoys coding and a passionate learner who quickly understands a vision and works with teams to deliver. I have leadership experience designing and developing product lines and company standards. I’ve been involved in architecting big data solutions to support Adaptive Learning and modeling student knowledge. I’ve lead research projects to operationalize emerging technologies with a published whitepaper in research around MongoDB and a patent pending in the area of Social Classroom Integration and Content Management. I enjoy sharing what I learn and have experience teaching wilderness survival skills. I was also a leader and teacher for immersive web development bootcamps where students learned hands-on skills building real world projects. I hold an MBA and a BS degree in information technology. As a continuous learner, I like to supplements my education with opencoursware from MIT and Stanford. When I’m not programming or reading something new, you can find me on the slopes following my true passion of skiing.

Updated on September 17, 2022

Comments

  • Brig
    Brig over 1 year

    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?

    • Matt
      Matt over 13 years
      Does it show properly when you ssh or telnet to the box, as opposed to just opening a console from your desktop?
    • Brig
      Brig over 13 years
      Running sudo ls -al var/ returns drwxr-x--x 6 sysuser abbagroup 4096 2010-07-28 11:55 . drwxr-xr-x 10 sysuser abbagroup 4096 2010-09-08 12:45 .. drwx--x--x 3 sysuser abbagroup 4096 2010-07-28 11:55 lib drwx--x--x 3 sysuser abbagroup 4096 2010-07-28 11:55 log drwx--x--x 4 sysuser abbagroup 4096 2010-07-28 11:55 run drwx--x--x 5 sysuser abbagroup 4096 2010-07-28 11:55 spool
    • Dennis Williamson
      Dennis Williamson over 13 years
      Does id also show abbagroup for that user?
  • Dennis Williamson
    Dennis Williamson over 13 years
    Looks like the group does to me.
  • tovare
    tovare over 13 years
    You're right about the group :)