1

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

Why do I get Permission denied?

$ ./downloadbcfi
Current name is /download.files.R1201BHtm.zip
/tmp/f.zip: Permissin denied

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

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

2 Answers 2

3

Use this command in command line tool

chmod 0777 /tmp/f.zip
1

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

You must log in to answer this question.