how to fix Permission denied on directory in unix?
37,450
Solution 1
Use this command in command line tool
chmod 0777 /tmp/f.zip
Solution 2
if you have ran your script as root and now as normal user. Then you may not have permission to read/write f.zip
Related videos on Youtube
Author by
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
I have a ksh file which will download a zip file from the internet in the
/tmp
directory with namef.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:-
Sjoerd about 12 yearsIt could be because /tmp/f.zip already exists.
-
Oleg Mikheev about 12 yearstried to run script as root?
-
Wooble about 12 yearsIs the shell really spelling "permission" wrong, or is this not an actual copy and paste?
-
Admin about 12 yearsYou are right /tmp/f.zip already exists and i have not permission to write to it. thanks
-