Why can't I run a *.ksh file?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Why can't I run a *.ksh file?
# 1  
Old 07-22-2002
Why can't I run a *.ksh file?

Hi

I'm interested to know why is it that I can't run a specific *.ksh file, is it due to permission settings? If it is, how can I work around that? I'm not logging on as the administrator, do I need to be an administrator to run *.ksh files?
# 2  
Old 07-23-2002
The extension is irrelevant when it comes to what files you can run - unless you have something specifically written in your system - which is not likely.

Can you show me what the file permissions look like...and how it is you are trying to run the file.

i.e do an "ls -l" for the file and then from the directory it's in type => ./filename
# 3  
Old 07-23-2002
Type ls -l for looking at the permissions for the file..


The file's permission looks something like this..

-rwxr-xr-x

r - read
w - write
x - execute

The first three is for the owner and the second is for the group and the third for the others.

U can change the file permissions using chmod

Is this what u wanted to know??

-Nisha
# 4  
Old 07-23-2002
well you might be able to change the permissions....depending on what they are...if you don't have the appropriate access you can't change the permissions....!!
# 5  
Old 07-23-2002
Thanks!

Thanks guys for all the help you've provided me, I guess I'll have to check with my admin to see if I have the rights...
# 6  
Old 07-24-2002
Also, if you are calling a binary from a directory you don't have access to, you will get errors as well. So make sure you have permission to run any binaries that may be in your script.

Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

To run ksh script via autosys job without asking password for file transfer

I've K shell script. It will transfer the files from one server to other server using 'SCP' command. While running the script alone as a command line in UNIX ssh terminal its running with out asking password and files are transferred with out asking for password. But by running the script using... (6 Replies)
Discussion started by: maheshbabu
6 Replies

2. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

3. Solaris

Correct me to run a sh file in ksh shell!

Hi all! I wrote a file named as rman_backup.sh, and this is contents #!/bin/ksh ORACLE_SID=VNP;export ORACLE_SID echo $ORACLE_SID echo "Please Specify the kind of backup you want to take" echo "1) LEVEL 0 VNP" echo "2) LEVEL 1 VNP" echo "3) EXPORT BACKUP" echo "Enter your option" ... (4 Replies)
Discussion started by: trantuananh24hg
4 Replies

4. UNIX for Advanced & Expert Users

How to remove a file with a leading dash '-' in it's name?

Somehow someone created a file named '-ov' in the root directory. Given the name, the how was probably the result of some cpio command they bozo'ed. I've tried a number of different ways to get rid of it using * and ? wildcards, '\' escape patterns etc.. They all fail with " illegal option --... (3 Replies)
Discussion started by: GSalisbury
3 Replies

5. UNIX for Dummies Questions & Answers

HELP! The '/var/adm/message' file increase every few seconds???

Hi, guys, I have a big problem. I've got a sun solaris 4.1.4 workstation, and the /var/adm/message file will add one row every few seconds. It becomes a large file in a short time. I wander if there are some mistakes configuring the workstation. the /var/adm/message is as follow: ... (3 Replies)
Discussion started by: cloudsmell
3 Replies

6. Filesystems, Disks and Memory

HELP! The '/var/adm/message' file increase every few seconds???

Hi, guys, I have a big problem. I've got a sun solaris 4.1.4 workstation, and the /var/adm/message file will add one row every few seconds. It soon becomes a large file. I wander if there are some mistakes configuring the workstation. the /var/adm/message is as follow: ... (1 Reply)
Discussion started by: cloudsmell
1 Replies

7. Shell Programming and Scripting

'tee' STDERR output (ksh)

Hi everyone, KSH question: I know you can 'tee' STDOUT to have the output go to multiple targets; can you do the same with STDERR? For example: ls |tee /tmp/file.txt Will redirect STDOUT to both the screen and the '/tmp/file.txt' file. Is there a way of doing the same thing for... (5 Replies)
Discussion started by: gsatch
5 Replies

8. UNIX for Dummies Questions & Answers

How a program to convert '|' delimited file into excel?

Hi All, I want to convert a '|' delimited file to excel file. I want it is an automated process (this means I need not to open excel, import and choose '|' delimited, then ... to generate an excel) I need to use a scripts or proram to convert the file. Do any one have this tools? A... (11 Replies)
Discussion started by: wilsonchan1000
11 Replies

9. UNIX for Dummies Questions & Answers

Why won't my script run?

On the following script that I get an error when I try to execute as root: #./mv_log.sh bash: /root/util/mv_log.sh: Permission denied #!/usr/bin datetag=`date --date='1 day ago' +"%b%d%Y"` logname=`find /opt/bea/wlserver6.1/config/*/logs/ -iname 'access.log0*' -mtime -1 -print` mv... (4 Replies)
Discussion started by: darthur
4 Replies

10. Shell Programming and Scripting

Clearify what it means under 'WHAT' when hit the 'w'-command

I wonder how I shall read the result below, especially 'what' shown below. The result was shown when I entered 'w'. E.g what is TOP? What is gosh ( what does selmgr mean?)? login@ idle JCPU PCPU what 6:15am 7:04 39 39 TOP 6:34am 6:45 45 45 TOP 6:41am ... (1 Reply)
Discussion started by: Aelgen
1 Replies
Login or Register to Ask a Question