The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to change permissions only to files, not directories....? narrok UNIX for Dummies Questions & Answers 3 12-13-2008 03:55 AM
How to change name for N number of files kamathg Shell Programming and Scripting 6 08-08-2007 08:35 AM
Change permission for directories and files mingfei2006 Shell Programming and Scripting 1 08-23-2006 08:00 AM
My device files change!!!! lenux78 Red Hat 2 07-13-2006 10:07 AM
How do I change ownership of a directory and all of it's files. mborin UNIX for Dummies Questions & Answers 1 02-25-2001 06:24 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-19-2006
naamas03 naamas03 is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 91
how to change mod of files

hi everyone
I have a directory /usr5/sch.
The shell is /bin/csh/. In this directory, I have a script called cs-claims-tst that runs an object cobol that going over a few other directory and open files and inserting them to d.b!
If i run this script from its current directory, it works o.k, but
I have another directory /usr2/hafala.

And i did like this:
cd /usr2/hafala
ln -s /usr5/sch/cs-claims-tst

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).

My question is, why doesn't he recognized it
My second problem: if there is not solution for this problem that means
that I need to go to account call manager and do chmod 777 for the directories from their and i don't know how to do this because the shell
in the manager is /usr/bin/ksh.

please someone help me to solve the problem
thank's a lot

Last edited by RTM; 03-22-2006 at 03:25 AM.. Reason: Formatting to be able to read it
  #2 (permalink)  
Old 03-22-2006
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
First, post what userid you are using (found with "id" command). Then post the output of the following commands:

ls -ld /usr2/hafala
ls -ld /usr2/sch

Your issue may be as simple as requiring read permissions versus setting all files to 777 (which is read, write, execute).

Also, the chmod command works the same in ksh and csh.
  #3 (permalink)  
Old 03-22-2006
mr-synapse mr-synapse is offline
Registered User
  
 

Join Date: Jul 2005
Location: Mt. Prospect, Illinois
Posts: 32
Link Name?

It appears as though you're not using the link command correctly, i.e. you need to specify a link name e.g.:

ln -s /file_to_link name - where name is name of link!

Good luck!

  #4 (permalink)  
Old 03-22-2006
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
mr-synapse,

Actually, if you don't put the last parameter, it names the link the same as the physical file. (I thought the same thing - so I tried it - it was the 'new lesson' for the other day)
  #5 (permalink)  
Old 03-23-2006
naamas03 naamas03 is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 91
hi everyone
thanks for your answers!

doing like this ls -ld /usr5/sch
drwxrwxrwx 13 sch other 151552 Mar 23 13:24 /usr5/sch

ls -ld /usr2/hafala
drwxrwxrwx 3 hafala other 10240 Mar 22 14:23 /usr2/acct/hafala

it's very strange because when i'm creating files in /usr2/hafala
the group is ext_cust

When i did id in both directories i got something like this
uid=245(sch) gid=1(other)

however i know what is chmod and i know all the options but
when i did the link it's just dont open the files until i will do chmod commnd which if i need to do it i want that it will be part of the script that i'm running

how to do it (maybe with rlogin to the user that i can chng the mod?)
maybe i should do a hard link ?
please help me here ?

Last edited by RTM; 04-23-2006 at 11:55 AM..
  #6 (permalink)  
Old 03-30-2006
naamas03 naamas03 is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 91
hi every one
did someone fond a solution to my problem
please help me here
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0