how to fix Permission denied on directory in unix?

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

2 Answers

Use this command in command line tool

chmod 0777 /tmp/f.zip

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like