files with different permissions are getting creater


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers files with different permissions are getting creater
# 1  
Old 07-16-2008
files with different permissions are getting creater

Hi,

Within a SQL file i am calling 5 shell scripts in back ground and redirecting their outputs to different log files in a specific directory.
Now when I observed is, the log files are created with different permissions even though i did not do any thing specific.

For example in run_scripts.sql I am doing:
! nohup /u36/app/1SR/v69/111.sh > /nw_disk1/oradb/flatfile/log/111.log &
! nohup /u36/app/1SR/v69/222.sh > /nw_disk1/oradb/flatfile/log/222.log &
! nohup /u36/app/1SR/v69/333.sh > /nw_disk1/oradb/flatfile/log/333.log &
! nohup /u36/app/1SR/v69/444.sh > /nw_disk1/oradb/flatfile/log/444.log &
! nohup /u36/app/1SR/v69/555.sh > /nw_disk1/oradb/flatfile/log/555.log &

After the scripts are executed when i checked in /nw_disk1/oradb/flatfile/log directory: ls -ltr *.log

-rw-r--r-- 1 oracle dba 1059 Jul 16 06:15 111.log
-rw-r--r-- 1 oracle dba 1428 Jul 16 06:15 222.log
-rw-r----- 1 oracle dba 1059 Jul 16 06:15 333.log
-rw-r----- 1 oracle dba 1212 Jul 16 06:15 444.log
-rw-r----- 1 oracle dba 1129 Jul 16 06:15 555.log

How this is possible? Only first 2 log files have read permissions for others.

Thanks in advance.
# 2  
Old 07-16-2008
>the log files are created with different permissions even though i did not do any thing specific.

* are created if inexistant ( using your umask, by the look of things:022) - or - scratched and reused otherwise and so with the initial perms of file.
# 3  
Old 07-16-2008
Thanks for the reply vbe. But i could not your response understand completely.
My umask is 022 and I would be very glad if you can eloborate your reply.

Thanks in advance
# 4  
Old 07-16-2008
ant:/home/vbe $ ll zzzz
-rw-r----- 1 vbe bin 2018 Jul 16 14:13 zzzz
ant:/home/vbe $ umask
00
ant:/home/vbe $ umask 022
ant:/home/vbe $ umask
022
ant:/home/vbe $ ll zzzz
-rw-r----- 1 vbe bin 2018 Jul 16 14:13 zzzz
ant:/home/vbe $ >zzzz
ant:/home/vbe $ ll zzzz
-rw-r----- 1 vbe bin 0 Jul 16 14:14 zzzz
ant:/home/vbe $
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Permissions on directories and files

Hello, I have a main directory called /test123 /test123 has lot of sub-directories and files. drwxr-x--- 21 root system 4096 Jan 25 10:20 /test123 Here, "other" does not have any access to /test123 folder. How can we provide read-only access to others on /test123... (1 Reply)
Discussion started by: aaron8667
1 Replies

2. Solaris

Change permissions for files

Hi! I have a dir in a server, that receives files with the wrong permissions, so I decide to put on a cron entry that changes its permitions, but because of the time gap, not all of them get changed. What I did was the following: ... (14 Replies)
Discussion started by: fretagi
14 Replies

3. Shell Programming and Scripting

Have files take on DIR permissions

Hello all; I have a question based on a ticket I have from a user... K...first some background...this client needed a generic user setup to allow them to ftp files; user is called "msifpt"...so here's what they want to do now with this account: 1. Client will use the user id ‘msiftp'... (1 Reply)
Discussion started by: gvolpini
1 Replies

4. UNIX for Dummies Questions & Answers

Permissions issue after copying files

Hi everyone, I am using mac os x 10.6, and I just copied over a project from a machine with 10.5... And I noticed my ls color is very funky in this directory... I found that my permissions are all messed up, and am wondering if there is a way to recursively fix permissions? This is how they... (3 Replies)
Discussion started by: patrick99e99
3 Replies

5. Shell Programming and Scripting

How to collect all the list of files along with the permissions

Hi guys, I have one problem. I need collect the list files along with the file permissions in all directories in one server. Is their any easy way to collect using any commands or any scripts? Advance Thanks :) (2 Replies)
Discussion started by: kartheek
2 Replies

6. UNIX for Advanced & Expert Users

files created with different permissions

Hi, Within a SQL file i am calling 5 shell scripts in back ground and redirecting their outputs to different log files in a specific directory. Now when I observed is, the log files are created with different permissions even though i did not do any thing specific. For example in... (2 Replies)
Discussion started by: steria_learner
2 Replies

7. UNIX for Dummies Questions & Answers

How to change default permissions on new files

Hello, I would like to know if there was any way I can change the default permissions for new files being generated within a certain directory. Would I need to have the same permissions set at the directory level as for the files being generated in it. Regards, Rdgblues (1 Reply)
Discussion started by: rdgblues
1 Replies

8. Shell Programming and Scripting

Find files based on permissions

Hi. I want to get a list of files, in a given folder, that aren't world readable (a+r). I've looked at the documentation on the FIND command, however I don't see how to list files by excluding permissions. find . -perm 644 -> would list only files that are 644 If I could use wildcards, I... (1 Reply)
Discussion started by: dmilks
1 Replies

9. UNIX for Dummies Questions & Answers

Permissions on link files

Does any one now if you can change permissions on a linked file with out completely removing it and then relinking it? (2 Replies)
Discussion started by: moviestud80
2 Replies

10. UNIX for Dummies Questions & Answers

Setting Default Permissions for Files

Hi, I am setting up an area on a unix server where multiple people will be editing web pages. Can anyone tell me how to set it up the directory and subdirectories so that when a user creates a new file, it defaults to permissions of 664 or 775? I've tried using umask but from what I can... (1 Reply)
Discussion started by: robbieg
1 Replies
Login or Register to Ask a Question