Now I did come up against an oracle bug while doing this, concerning the required permissions on the oracle export directory. For example thigns probably go a little like this.
SQL> create directory expdir as '/tmp/my_export_dir/'
SQL> commit;
~> expdp directory=expdir yadda yadda yadda...
Now as we all know , as datapump is a server side process it runs with the same uid / gid as the server does.. Typically oracle:oracle .. So you'd expect these sort filesystem permissions to work on the export directory.
// this works fine
~> chmod 770 /tmp/my_export_dir; chown oracle:mygroup /tmp/my_export_dir;
~> expdp job...
// this works fine
~> chmod 770 /tmp/my_export_dir; chown myuser:oracle /tmp/my_export_dir;
~> expdp job...
// this does not, even though it should
~> groupadd oragrp
~> useradd -G oragrp oracle
~> chmod 770 /tmp/my_export_dir; chown myuser:oragrp /tmp/my_export_dir;
~> expdp job...
in this case oracle spews out abunch of errors like this:
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 488
ORA-29283: invalid file operation
So as the title of this post suggests this has been verified by oracle to be a bug affect up until at least 10.2.0.4 (SPARC and solaris x86) and 11.1.0.7 .. Oracle are working on a fix.
So for now you'll need to use permissions along the lines of these:
chmod 777 /tmp/expdir; chown anyuser:anygroup /tmp/expdir;
chmod 770 /tmp/expdir; chown oracle:anygroup /tmp/expdir;
chmod 770 /tmp/expdir; chown anyuser:oracle /tmp/expdir;