Permission denied when trying to list directory...

Discussion in 'macOS' started by orbdrums, Feb 11, 2012.

  1. orbdrums macrumors member

    Joined:
    Dec 13, 2008
    #1
    I'm trying to ls -al the contents of /var/spool/mqueue and Terminal is coming back with Permission denied. If I'm the admin on my machine how can this be denied? Thanks in advance.
     
  2. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #2
    You may be an admin, but some things are off limits to everyone except root. Use sudo before the command to give yourself root permissions to view the contents.
     
  3. orbdrums thread starter macrumors member

    Joined:
    Dec 13, 2008
    #3
    Thanks! Don't know why I stumbled on something like that. My mind was elsewhere.
     
  4. orbdrums thread starter macrumors member

    Joined:
    Dec 13, 2008
    #4
    Now I'm stuck at removing files from my postfix/active directory. When I use sudo cd postfix/active it appears to change directory but when I only get to /postfix. When I use sudo ls -l it shows only the postfix directory contents. When I use sudo ls -l active the active messages are shown:

    sudo ls -l active
    total 232
    -rwx------ 1 _postfix wheel 705 Feb 11 16:58 072FB25E69FC
    -rwx------ 1 _postfix wheel 586 Feb 11 16:58 0FE4C25E9EFA
    -rwx------ 1 _postfix wheel 807 Feb 11 16:58 1286F25E04AB
    -rwx------ 1 _postfix wheel 705 Feb 11 16:58 18F4D25E6B17
    -rwx------ 1 _postfix wheel 618 Feb 11 16:58 275A225E3A20
    -rwx------ 1 _postfix wheel 892 Feb 11 16:58 302E525E9EAC
    -rwx------ 1 _postfix wheel 570 Feb 11 16:58 40DB425E739C
    -rwx------ 1 _postfix wheel 553 Feb 11 16:58 4231F25E56FE
    -rwx------ 1 _postfix wheel 613 Feb 11 16:58 424BD25E3A93
    -rwx------ 1 _postfix wheel 703 Feb 11 16:58 485F225E54B4
    -rwx------ 1 _postfix wheel 711 Feb 11 16:58 4F9C625E841F
    -rwx------ 1 _postfix wheel 891 Feb 11 16:58 50BF825EA289
    -rwx------ 1 _postfix wheel 594 Feb 11 16:58 60AFA25E3BA3
    -rwx------ 1 _postfix wheel 807 Feb 11 16:58 6197C25E06CB
    -rwx------ 1 _postfix wheel 594 Feb 11 16:58 6200025E3B71
    -rwx------ 1 _postfix wheel 576 Feb 11 16:58 7368A25E3D6B
    -rwx------ 1 _postfix wheel 807 Feb 11 16:58 73D0B25E0722
    -rwx------ 1 _postfix wheel 579 Feb 11 16:58 7937C25E8316
    -rwx------ 1 _postfix wheel 799 Feb 11 16:58 8345F25E3AD3
    -rwx------ 1 _postfix wheel 596 Feb 11 16:58 89D8625E1359
    -rwx------ 1 _postfix wheel 705 Feb 11 16:58 B2F1725E6D8F
    -rwx------ 1 _postfix wheel 596 Feb 11 16:58 B68B925E140C
    -rwx------ 1 _postfix wheel 711 Feb 11 16:58 B94A525E9D05
    -rwx------ 1 _postfix wheel 596 Feb 11 16:58 BC91125E1586
    -rwx------ 1 _postfix wheel 594 Feb 11 16:58 C077425E3B24
    -rwx------ 1 _postfix wheel 558 Feb 11 16:58 C268B25E831B
    -rwx------ 1 _postfix wheel 705 Feb 11 16:58 C88D525E6B4F
    -rwx------ 1 _postfix wheel 892 Feb 11 16:58 D043525E9E53
    -rwx------ 1 _postfix wheel 780 Feb 11 16:58 D5D1825E4160

    How do I get to the active directory to remove the messages that I want?
     
  5. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #5
    based on your other thread, you messed up removing them, but you really shouldn't be deleting files/folders in the system folders. Bad things can happen when people start messing with those folders and files.
     

Share This Page