The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Running file without execute permissions rakeshou UNIX for Dummies Questions & Answers 3 10-16-2008 01:51 PM
i want to write a script to test the folder permissions rajesh212512 Shell Programming and Scripting 4 07-11-2008 10:14 AM
Export a file system with write permissions jredx Filesystems, Disks and Memory 7 05-27-2008 12:05 AM
Newly created files default group and write permissions goldfish UNIX for Dummies Questions & Answers 2 02-20-2008 03:39 PM
help with permissions - execute but not delete reldb UNIX for Dummies Questions & Answers 2 06-01-2007 12:30 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-25-2008
joeyg's Avatar
Moderator
 

Join Date: Dec 2007
Location: Home of world champion Boston Celtics
Posts: 983
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?
Reply With Quote
Forum Sponsor
  #2  
Old 08-25-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,298
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
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0