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

I have a ksh file which will download a zip file from the internet in the /tmp directory with name

Why do I get Permission denied?

$ ./downloadbcfi
Current name is /
/tmp/ Permissin denied

When I look at the permission on the /tmp directory everything is ok as below: enter image description here

share|improve this question

migrated from Feb 16 '12 at 2:57

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

It could be because /tmp/ already exists. – Sjoerd Feb 15 '12 at 12:09
tried to run script as root? – Oleg Mikheev Feb 15 '12 at 12:14
Is the shell really spelling "permission" wrong, or is this not an actual copy and paste? – Wooble Feb 15 '12 at 12:18
You are right /tmp/ already exists and i have not permission to write to it. thanks – itro Feb 15 '12 at 13:21
up vote 2 down vote accepted

Use this command in command line tool

chmod 0777 /tmp/
share|improve this answer

if you have ran your script as root and now as normal user. Then you may not have permission to read/write

share|improve this answer

You must log in to answer this question.