Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I enter the following command in my mac OSX terminal i get a "permission denied" error even though I have administrative privileges.


administrators-Mac-mini-2:Build Foldername sarwan$ ./dpkg-scanpackages -m . /dev/null --> Packages


-bash: ./dpkg-scanpackages: Permission denied

EDIT: The Build I am trying to make is for an ios project thats why I included the iphone tag.I don't know if that helps or not.

EDIT 2 Thanks Gryphius your answer is correct.

share|improve this question

migrated from Dec 20 '12 at 16:57

This question came from our site for professional and enthusiast programmers.

check if the file dpkg-scanpackes is executable – Gryphius Dec 20 '12 at 12:07
@Gryphius write your answer in the answers section so that I can choose it as the correct Answer. – IosBoy Dec 20 '12 at 12:33
done, thanks for accepting. – Gryphius Dec 20 '12 at 13:02
up vote 3 down vote accepted

if a file is not executable you get this error even with administrative privileges. make your script executable and it should work

[root@boscos gryphius]# echo 'echo hello world!' >
[root@boscos gryphius]# ./
bash: ./ Permission denied
[root@boscos gryphius]# chmod 755 
[root@boscos gryphius]# ./ 
hello world!
share|improve this answer

Despite being logged in with administrative privileges, you usually need to use sudo at least once before you are granted these privileges through terminal (at least thats what I've found).

Try "sudo Build SGService sarwan$ ./dpkg-scanpackages -m . /dev/null --> Packages"


share|improve this answer
I rather think sudo should be put in front of the real command, not in front of the prompt (which is, admittedly, not separated in a very readable way)... – glglgl Dec 20 '12 at 12:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .