Import datadump in schema mode why am I encountering this error when executing impdp command? 

My command looks like this:

impdp directory=dp_dir dumpfile=testdb.dmp logfile=testdb.log


Error message: 

ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
One way to find the cause of ORA errors is to use oerr tool by Oracle. In the error stack the top most is the application error which is followed by other secondary errors. 

For example, the ORA-39002 and ORA-39070 are Datapump errors. Lets see what the oerr tool says for ORA-39070.


  [oracle@localhost ~]$ oerr ORA 39070
  39070, 00000, "Unable to open the log file."
  Cause:  Errors were detecting while opening the log file.  Subsequent
           messages will detail the problems.
  Action: Fix the problems outlined in the secondary messages.


The action is to fix the problem outlined by the secondary error message that is ORA-29283.


  [oracle@localhost ~]$ oerr ORA 29283
  29283, 00000, "invalid file operation"
  Cause:  An attempt was made to read from a file or directory that does
           not exist, or file or directory access was denied by the 
           operating system.
  Action: Verify file and directory access privileges on the file system,
            and if reading, verify that the file exists.


And that's it.