how to change mod of files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to change mod of files
# 8  
Old 04-23-2006
Quote:
When I run the script in this directory, (shell(/bin/csh)) it's not open my directories unless I will do chmod 777 for the files in all the directories (something like 20).
What are the permissions on the files before you start changing them to 777? (Note: instead of setting everything to 777, maybe you should try to set the directories to 755, and files to 644 or 664.)

Use the sch account and create a new directory under /usr5/sch/ called test and a new file called testfile in that test directory. Cd to /usr5/sch and do a ls -l ./test and a ls -ld ./test - post the output.

Post the output of the umask command.

You may need to explain your script and cobol program a bit more - what it's doing in all of this. And please format your explaination, questions, and answers. It is difficult to read everything when you just run it all together.
# 9  
Old 04-30-2006
hi all
i have directory /usr5/sch/cpe
this directory have script call cs-claims
#!/bin/sh
O-CLAIMS_CONFIRM
this is a cobol object
in the object he goes to something like 20 directories
and get current file call claims_data*
in some directories this the mod of the file is
-rw-r----- 1 other 38988 Apr 27 20:32 claims_data_001
in other directory its
-rwxrwxrwx 1 other 116280 Mar 13 19:49 claims_data_007
when i'm running the script from /usr5/sch/cpe
it runs o.k
now i have form in developer that the application sitting on
other directory call
/usr2/acct/hafala
when i'm running the form
is host ('cs-claims-script');
cs-claims-script
which doing sh cs-claims
but he cant open the files from the directory
unless i will do chmod 777 to all the files that are claims_data
something that i did not have to do if i'm running the script from /usr5/sch/cpe
now the only way to change the mod of the file need to be from
administrator account (no server!!!) how can i write a script
or from the current script to connect to the login and passwd automitacly
and change the mod files ??
thanks a lot please help me here i'm stuck in a middle
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Alert when files change

The code I created monitors directories, files and reports when it has changed. It saves the md5sums of the files it is monitoring and sends alert whenever any files change. It sends an excel report to admin. My code is not working. I getting error messages. log.xlsx - the log output should... (3 Replies)
Discussion started by: dellanicholson
3 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

Change the content of files but not change the date

I have 100 files in a directory , all the files have a word "error" and they are created in different date . Now I would like to change the word from "error" to "warning" , and keep the date of the files ( that means do not change the file creation date after change the word ) , can advise what can... (7 Replies)
Discussion started by: ust3
7 Replies

4. Shell Programming and Scripting

Change the content of files but not change the date

I have 100 files in a directory , all the files have a word "error" and they are created in different date . Now I would like to change the word from "error" to "warning" , and keep the date of the files ( that means do not change the file creation date after change the word ) , can advise what can... (0 Replies)
Discussion started by: ust3
0 Replies

5. Shell Programming and Scripting

sed change in all files

I have a list of property file can each file has name=value kind of key value pair can replace all = with say ; in each file using sed or any other command (4 Replies)
Discussion started by: Vinayshell
4 Replies

6. Shell Programming and Scripting

Find required files by pattern in xml files and the change the pattern on Linux

Hello, I need to find all *.xml files that matched by pattern on Linux. I need to have written the file name on the screen and then change the pattern in the file just was found. For instance. I can start the script with arguments for keyword and for value, i.e script.sh keyword... (1 Reply)
Discussion started by: yart
1 Replies

7. Shell Programming and Scripting

This script cut size of files "Lol" change string in files

Basic: find . -type f -name “*.txt” -print | awk '{gsub("Ontem", "AntesdeOntem", $0); print > FILENAME}' *.txt The idea is in folder /home/myapontamentos I have some files and i need to change in all them the word "ontem" to "antesdeontem". But bigger files are cut (size i mean)... (4 Replies)
Discussion started by: single
4 Replies

8. Shell Programming and Scripting

How to change name for N number of files

Hi Guys, Please can you let me know, how to change file names in a directory that has say 10 files I have files like STR1.rman.pre.script STR1.rman.post.script STR1.rman.inc.script STR1.rman.cold.script STR1.rman.hot.script I need a command to change the above files all in one go... (6 Replies)
Discussion started by: kamathg
6 Replies

9. Shell Programming and Scripting

retain create/mod date and time of files

Hi, I have a requirement by which I need to take a snapshot of a certain directory of a certain types of files into a target directory within the same server (HP-UX 9000). The problem is that the files created in the target directory has the date and time of when the files were copied over. ... (5 Replies)
Discussion started by: jerardfjay
5 Replies
Login or Register to Ask a Question