Default read/write/execute permissions


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Default read/write/execute permissions
# 1  
Old 08-25-2008
Question Default read/write/execute permissions

I am perplexed that my script execution is not always consistent in creating new files. Specifically, my group read/write/execute permissions. For instance, take a look at the following:

Code:
-rw-rw----   1 jg   dp  18648 Aug 22 10:06 nx081508.txt
-rw-rw----   1 jg   dp  22422 Aug 22 10:06 nx081808.txt
-rw-rw----   1 jg   dp   6993 Aug 22 10:06 nx081908.txt
-rw-rw----   1 jg   dp  25308 Aug 22 10:06 nx082008.txt
-rw-rw----   1 jg   dp  15873 Aug 22 10:06 nx082108.txt
-rw-rw----   1 jg   dp  95319 Aug 22 10:06 nx082208.all
-rw-r-----   1 jg   dp  88911 Aug 22 10:06 nx082208.txt
-rw-rw----   1 jg   dp  94518 Aug 22 10:06 nx082208.uid

One of my .txt files does not have group 'w' access. And this can become a problem is another user needs to do something with that file.

I know, I could have my script do a chmod to the *.txt files after it is done, but that seems silly.

So, any idea where this might be set such that users sometimes set correctly and sometimes not?
# 2  
Old 08-25-2008
When you created the file, some app (example: an editor on another PC or on your unix box), writes the file for the first time and the umask value is different from your default umask. The protections persist unless you overwrite them.

apps may call umask, so that while running and creating files in your name, the protections are different.

man 2 umask
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to give permissions to read write but not delete the file?

i want to give users the ability to create write and read files in other user directory , but not to have option to delete the file after created ( sticky bit not going to work here ... ) for example : i have user : manager with directory repository i have user : worker1 that need to write... (4 Replies)
Discussion started by: umen
4 Replies

2. Shell Programming and Scripting

perl script to check read/write/execute permission for 'others'

I want to check access rights permissions not for 'user', not for 'group', but for 'others'. I want to do it by system command in which i want to use 'ls -l' and 'awk' command. I have written the following program : #!/usr/bin/local/perl #include <stdlib.h> system ("ls -l | awk... (1 Reply)
Discussion started by: shubhamsachdeva
1 Replies

3. Solaris

add a ftp user with read and write permissions on a directory

hi all how I can create an ftp user in solaris 10 and have read and write permission on a directory. Thanks. (1 Reply)
Discussion started by: luisfja
1 Replies

4. Solaris

Why user has permissions to execute 'init 0'?

Hi all. On one workstation run Solaris 10 a simple user can to execute 'init 0' command without input (su and root password). Example: % init 0 % OK I don't understand how user can execute 'init 0' command on this workstation? 1) I checked /usr/local/etc/sudoers all lines are... (6 Replies)
Discussion started by: wolfgang
6 Replies

5. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

6. UNIX for Dummies Questions & Answers

About read,write & execute permissons of a directory

Hi all, I want to know differences between read,write & execute permissons given to directory. Thanx in advance. (6 Replies)
Discussion started by: vishwasrao
6 Replies

7. UNIX for Dummies Questions & Answers

Running file without execute permissions

Please explain this strange behavior to me bash-2.03$ ls -l abc -rw------- 1 bashboy users 319 Sep 21 18:02 abc bash-2.03$ ./abc bash: ./abc: Permission denied bash-2.03$ . abc Successfully run I wanted to ask how the file executes without the execute permissions when we... (3 Replies)
Discussion started by: rakeshou
3 Replies

8. UNIX for Dummies Questions & Answers

Newly created files default group and write permissions

Whenever I create a new file the group name is "dnn" and the file permissions are "-rw-r--r--". How do I get it so when I create files (with vi or other programs) that the default group is "sss" and the permissions are 770? (I am running HP-UNIX) Thanks, GoldFish (2 Replies)
Discussion started by: goldfish
2 Replies

9. UNIX for Dummies Questions & Answers

help with permissions - execute but not delete

Hi, We have 2 users and one directory (dir). One user is admin user and other use r is operator user. who is responsible for just executing the scripts e.g. startWeblogic and stopWeblogic etc, we want to restrict this operator user in such a way that he can only execute these files and he should... (2 Replies)
Discussion started by: reldb
2 Replies
Login or Register to Ask a Question