![]() |
|
|
grep unix.com with google
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Our Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
How to create a file with full permission in unix script
In my script, I am creating a file ----> then writting one line (i.e. Timestamp) ----> then FTP'ing. The same script can be executed by many other users. While other users executing this script, they couldn't Over write this one line (i.e. Timestamp) My expectation So I wanted to create a file with full permission(_rwxrwxrwx). Not by chmod. Code Code:
dt=`date +%m_%d_%y` Tablename=$1 Filename=$Tablename"_"$dt.dmp FlgFile=$Tablename.flg echo $Filename > $FlgFile chmod 777 $FlgFile Error When other user executing this script they are getting an error chmod: changing permissions of .FlgFile. "Operation not permitted" Thanks in advance sbmk Last edited by pludi; 12-01-2009 at 05:36 PM.. Reason: code tags, please... |
|
|||
|
If your colleagues and you are in same unix group, umask 002 is enough.
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| UNIX file Permission | puspendu.das.in | UNIX for Advanced & Expert Users | 2 | 11-20-2009 06:32 AM |
| FTP Files should get full permission | vfrg | Shell Programming and Scripting | 1 | 10-22-2009 09:18 AM |
| How to create xls file using unix script | raghu.iv85 | Shell Programming and Scripting | 3 | 04-07-2009 03:18 AM |
| How to create file in ksh scripting with permission(rw-rw-rw) | mansa | Shell Programming and Scripting | 1 | 11-16-2008 07:39 AM |
| need a unix script to let me know by email or pager when the filesystem is 80% full. | jzjy0r | UNIX for Dummies Questions & Answers | 1 | 05-16-2002 06:04 PM |