1752681 Members
5496 Online
108789 Solutions
New Discussion юеВ

Re: file creation

 
SOLVED
Go to solution
himacs
Super Advisor

file creation

Hi all,

I have a partition with oracle:dba as owner and group.umask is 022.when oracle user creates any file default permission it shows rw_-r__-r.
I want it to be rwx for owner and r-x for group by default.

please help me on this.

regards,
himacs
11 REPLIES 11
T G Manikandan
Honored Contributor

Re: file creation

when a normal file is default created

its 666 and for a directory its 777

so when the umask is 022

666
022
---
644 which is rw-r-r-

Now for directory

777
022
----
755 which is rwxr_xr_x

so the present umask is fine, just because its file its rw_r_r.
himacs
Super Advisor

Re: file creation

Hi manikandan,

But when oracle creates any file ,permission shows rw_-r-r.


regards,
himacs
T G Manikandan
Honored Contributor

Re: file creation

because they are normal text files and have file permissions 0666 and with umask 0022 it gets 0644 which is rw_r--r--.

why do you need permissions 755 as those files are text files or log files.
I feel the present umask looks fine. Is there a reason you want to change.
himacs
Super Advisor

Re: file creation

hi manikandan,

thanks for ur reply.


i just confused..

but how we can set defualt permission for only files not dir.s which should not affect present umask.


regards,
himacs
T G Manikandan
Honored Contributor

Re: file creation

I dont think there is a way, if I am not wrong. probably if you want to change permissions with a specific oracle directory you can have a script that changes the permissions of those directory files every 3 hours or something.

But which is the directory/files which you are looking for a changed permissions,
Are they scripts, text files, special files which need the twx i.e. execute permissions?
himacs
Super Advisor

Re: file creation

hi mani,

not for special files...simple files


regards,
himacs
T G Manikandan
Honored Contributor

Re: file creation

if they are simple files why do you need execute permissions, rw should be fine.
But if still you need execute permissions and these files are generated out of the system, have a cron script that would change their permissions frequently.
T G Manikandan
Honored Contributor
Solution

Re: file creation

one other thing you do atmost would be having the umask set with oracle user's .profile

as

umask 0022

With oracle running under its group we are providing permissions for owner and group and restricting for others.

T G Manikandan
Honored Contributor

Re: file creation

sorry the last post I mean

umask from 022 to 002