Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Incorrect Permissions on a file Post 302512060 by Perderabo on Friday 8th of April 2011 09:46:04 AM
Old 04-08-2011
Create a shell script something like:
Code:
#! /usr/bin/ksh
umask 0
/oasis/bin/startPhantom NDRS.ICPM.CRU.DAY IBM.CROSS4 Y 1>/dev/null 2>/dev/null
chmod 666 /ramdisk0/icpm/ndrs/out/cru/*
exit 0

Make the script owned by and executable by uvstart. Become uvstart and run the script. If it does not work and you can't fix it, post the results. If it does work, change the crontab to run the script.

The umask command may or may not fix things by itself. But startPhantom may be internally deciding to make the file 660.

That startPhantom may be creating a background job and then exiting. Sometime later the background job finally creates the file. Meanwhile the chmod has already run.

Last edited by Perderabo; 04-08-2011 at 10:54 AM.. Reason: fix umsk
 

9 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

File Permissions

Hi ; Working off a AIX 4.3. There are three users, root, axel & rose. I have a directory where data is stored owned by root. Now as user axel & rose I cannot cp or mv the files out from this dir, but about a week ago this was possible. 1st Q is why this sudden change. 2nd Q is is there a... (3 Replies)
Discussion started by: buRst
3 Replies

2. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

3. Shell Programming and Scripting

Retain file permissions when saving .sh file from internet [OS X]

Hello. I have written a bash script that I am sharing with an OS X community I am a member of. The purpose of the script is to execute a series of commands for members without them having to get involved with Terminal, as it can be daunting for those with no experience of it at all. I have renamed... (4 Replies)
Discussion started by: baza210
4 Replies

4. Shell Programming and Scripting

Script extracting the incorrect data from text file

Hello, A script has been written to extract a specific column data from a text file ONLY if the user's initial input matches the the data of the first column in the text, then only the data from that row will be prinited. The problem I am having is that the code is only reading the records... (6 Replies)
Discussion started by: jermaine4ever
6 Replies

5. Shell Programming and Scripting

Merge lines in a file with Awk - incorrect output

Hi, I would like: FastEthernet0/0 is up, line protocol is up 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 output errors, 0 collisions, 0 interface resets Serial1/0:0 is up, line protocol is up 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 0... (14 Replies)
Discussion started by: mv652
14 Replies

6. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

7. Shell Programming and Scripting

Changing file permissions of a file created by another user

Hi, I have used expdp for datapump. The .dmp file is created by the "oracle" user. my requirement is to make a zipped file of this .dmp file. What i am trying to do is change the permissions of this .dmp file from 0640 to 0644 and then do a gzip and zip it. Is there any way i can change... (3 Replies)
Discussion started by: qwertyu
3 Replies

8. UNIX for Dummies Questions & Answers

ID incorrect field values in dat file and output to new file

Hi All I have a .dat file, the values are seperated by ". I wish to identify all field values in field 14 that are not '01-APR-2013' band then copy those records to a new file. Can anyone suggest the UNIX command required. Thanks in advance Andy (2 Replies)
Discussion started by: aurum1313
2 Replies

9. Shell Programming and Scripting

SUDOERS file settings Incorrect

1. I have user temp1 belonging to techx group $ id uid=1006(temp1) gid=1002(techx) groups=1002(techx) 2. We have user tomcat belonging to webadm group $ id uid=1017(tomcat) gid=1001(webadm) groups=1001(webadm) 3. We have user root belonging to root group. $ id uid=0(root) gid=0(root)... (2 Replies)
Discussion started by: mohtashims
2 Replies
GZEXE(1)						      General Commands Manual							  GZEXE(1)

NAME
gzexe - compress executable files in place SYNOPSIS
gzexe name ... DESCRIPTION
The gzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a penalty in performance). For example if you execute ``gzexe /usr/bin/gdb'' it will create the following two files: -rwxr-xr-x 1 root root 1026675 Jun 7 13:53 /usr/bin/gdb -rwxr-xr-x 1 root root 2304524 May 30 13:02 /usr/bin/gdb~ /usr/bin/gdb~ is the original file and /usr/bin/gdb is the self-uncompressing executable file. You can remove /usr/bin/gdb~ once you are sure that /usr/bin/gdb works properly. This utility is most useful on systems with very small disks. OPTIONS
-d Decompress the given executables instead of compressing them. SEE ALSO
gzip(1), znew(1), zmore(1), zcmp(1), zforce(1) CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the PATH environment variable to find gzip and some standard utilities (basename, chmod, ln, mkdir, mktemp, rm, sleep, and tail). BUGS
gzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases, using chmod or chown. GZEXE(1)
All times are GMT -4. The time now is 05:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy