This content has been marked as final. Show 13 replies
>> the dump file is created but the user don't have permission to delete those dmp files.
Who's that user, i.e. Database User or OS User other than Oracle (OS User), dosen't have the permission to delete the dump files generated. Only from OS user Oracle can delete those dumps or if those dumps have proper permission to deleted, then any OS User can deleted the dump files.
Thanks for your reply.
I know only OS user oracle can delete it but I don't want to give oracle password to the users who are using datapump, I just want a way in which users runs his expdp and whenever he want he can delete .dmp file by himself.
Do you know is there any other way or option that user can use and it creates the .dmp file with write privileges.
In that case, give full permission on the directory at OS level.
i.e. Let's say, all users expdp dump files are being generated in /u01/oradata/expdp, then login as Oracle User, give the full privileges to this directory.
$ chmod 777 /u01/oradata/expdp
I guess you have two options:
1) Change oracle's umask environment variable... which is a security breach, not recommended
2) Change file ownership or privileges in order to let users remove the file.
if i give 777 permission to a directory and then user runs expdp utility.Does new .dmp file will have 777 permission???
can't do umask...
There are 100s of users who are using this utility in 70 different instances and I don't want to go and manually change the ownership of file or give oracle password to users.
I just want a way in which users can do everything by itself..
How many OS users are there accessing expdp utility??
Around 15-20 users per instance and we have around 70 instances...
Either you may need to follow as I suggested above or as below.
Create the specific directory for each OS user who is using expdp utility and create the directories in Oracel (SQL), assign this directory to the database user.
OS User - Scott
Database User - Scott
login as super user
$ cd /u01/oradata/expdp
$ mkdir scott
$ chmod 700 scott
Login to sqlplus as sysdba
SQL> conn /as sysdba
SQL> create or replace directory scott_dmp as '/u01/oradata/expdp/scott';
SQL> grant read,write on directory scott_dmp to scott;
Thanks Sabdar...I will let you know how it's gone...
if you create a dir for this user and give that 777 permission, still user doesn't have delete permission to newely created .dmp file.
Still I need to go and manually change the permissions on .dmp file.
If you any other ideas please let me know.
Thanks for all our help.....
I think the best option could be if we run a cronjob every 5 min that will change the permissions on all .dmp file in a particular mount points...
Let me know you all thinks on this option.....
Execute below block using the any Oracle account which has execute permission on UTL_FILE.
UTL_FILE.FREMOVE('<your directory object>','<dump file name>');