31

I see these in the my Linux folder hierarchy after installing the Zend Framework.

/oradiag_root/
/user/myuser/oradiag_myuser/
/user/myuser/oradiag_root/

This name reminds me of Oracle. But I did not find any official documentation about this.

I didn't install any Oracle server. What's going on here?

iconoclast
  • 21,213
  • 15
  • 102
  • 138
dot
  • 311
  • 1
  • 3
  • 3
  • Did you mean Zend ***Framework*** or Zend ***Server***? I'm using the Zend Server and getting these files. The Zend Framework is something different (although it's possible that the Server uses the Framework). – iconoclast Sep 10 '12 at 18:50

4 Answers4

21

I never installed Oracle on my system and don't know why these directories kept being created, but I finally managed to stop them from reappearing. Here's how it's done.

First, head over to:

cd ~/oradiag_<username>/diag/clients/user_<username>/host_*/trace/

and then

head sqlnet.log

You should see an error message complaining about a directory not existing for r/w. For me, it was /usr/lib/log. I created the directory it was complaining about and deleted the oradiag_<username> directory, only to have it reappear later; however, the sqlnet.log file was now complaining about a different directory.

I repeated this process of creating directories a few times until the directory finally stopped appearing. In your case, the directories may be different, but here's what solved it for me:

sudo mkdir /usr/lib/log/diag/clients
sudo chmod 777 /usr/lib/log/diag/clients

Only the clients directory needs to be 777, apparently.

Now just wipe out the oradiag_<username> directories wherever they currently appear. They shouldn't pop up for you again.

In case you're curious, here's what finally ended up being written to that "missing" directory:

mike@mike-ubuntu:/usr/lib/log/diag/clients$ ll -a
total 8
drwxrwxrwx 2 root root 4096 2011-08-24 10:34 .
drwxr-xr-x 3 root root 4096 2011-08-24 10:34 ..

Brilliant.

Michael Moussa
  • 4,207
  • 5
  • 35
  • 53
  • 2
    777 permissions are (almost?) never necessary, and generally (or always?) a terrible idea. Are you sure you can't get by with less than that? Shouldn't you be able to just give access to the user or group that is being used to run the Zend Server? In my case the user is `zend` and the group is `zend`. Why not just give either of them ownership of the directories? Is it really necessary to make those directories world-writable? – iconoclast Sep 10 '12 at 18:53
  • The directory you need to create is a directory that otherwise wouldn't exist, has no contents, and serves no purpose other than to prevent another directory from being created in your /home that you didn't want anyway. I think there's no harm in using 777 here, HOWEVER, I don't remember testing with anything more restrictive (and I don't have an Ubuntu machine to test on now). If you can verify alternate permissions or grouping works, then feel free to edit my answer accordingly. – Michael Moussa Sep 11 '12 at 16:59
9

There are a lot of suggestions out there, but the only one that worked for me was this.

In Oracle 11gR1 and higher, you have to add this to your sqlnet.ora file first:

DIAG_ADR_ENABLED=OFF

After that, then other log-disabling settings should work:

TRACE_LEVEL_CLIENT = OFF
TRACE_DIRECTORY_CLIENT=/dev/null
LOG_DIRECTORY_CLIENT = /dev/null
LOG_FILE_CLIENT = /dev/null
LOG_LEVEL_CLIENT = OFF

The logs that are created are for the Oracle client. The logs may show up when any program tries to access an Oracle database.

Dee Newcum
  • 996
  • 1
  • 8
  • 9
  • After adding those options in my config file, the `oradiag_andrew` folder is not created anymore, but there is an empty directory `opt/oracle/product/11.2.0.3/client_1/lib/log/diag/clients` created in my home directory now. Any idea how to fix that? – Andrew Kravchuk Oct 13 '20 at 07:47
8

These folder are created by the Oracle 11 SQL*Net if sqlnet.ora is not available or does not define the parameter ADR_BASE (see http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/sqlnet.htm#BIIDEAFI).

broeni
  • 97
  • 1
  • 8
-1

If you've installed the Zend Framework, it appears to create these directories.

user432349
  • 39
  • 1
  • Yes it does, but I really wonder how to change the folder or get rid of it. – Daff Oct 26 '10 at 21:18
  • 4
    Zend Framework does **not** create these. Most likely, it is something to do with Zend Server and having oracle support enabled by default. Unpacking ZF by itself will not give you those directories (check the source tarballs if you don't believe me). – weierophinney Oct 15 '12 at 18:43