Re: Unix file permissions

  • From: James Foronda <James.Foronda@xxxxxxx>
  • To: deryaoktay@xxxxxxxxx
  • Date: Wed, 20 Sep 2006 10:07:01 -0400

Derya,

Derya Oktay wrote:
Hi Mladen
You see it works for udump directory. Could you do it for *.trc files in bdump directory?
Thanks.
Derya.

I don't know how to do that from Oracle BUT from OS level, the following works in Solaris 10. It could also work in AIX.


My bdump dir is in /tmp/testbdump:

o10R1/O10gR1@oracle> ls -ltr /tmp/testbdump/*
-rw-r----- 1 oracle dba 573 Sep 20 09:49 /tmp/testbdump/test_ora_21918_testusr_572.trc
-rw-r----- 1 oracle dba 13 Sep 20 09:52 /tmp/testbdump/dont_change_this.txt


I can do this to change the permission of all *trc files under my bdump:

o10R1/O10gR1@oracle> find /tmp/testbdump -type f -name "*trc" -exec chmod o+r {} \;

What that says is: Start a find from /tmp/testbdump. Find all files (-type f, excludes directories, symlinks, etc.) whose name end in trc (-name "*trc") and for each file that meets that criteria, add read permission for "others".

Verify the changes:

o10R1/O10gR1@oracle> ls -ltr /tmp/testbdump/*
-rw-r--r-- 1 oracle dba 573 Sep 20 09:49 /tmp/testbdump/test_ora_21918_testusr_572.trc
-rw-r----- 1 oracle dba 13 Sep 20 09:52 /tmp/testbdump/dont_change_this.txt
o10R1/O10gR1@oracle>


If that works for you, you can then put that in a cron job.


HTH.

James
http://jforonda.vintarinian.com
--
//www.freelists.org/webpage/oracle-l


Other related posts: