Sponsored Content
Top Forums Shell Programming and Scripting Change: xecho: execute permission denied error Post 302377655 by simpsonjr on Friday 4th of December 2009 04:04:26 PM
Old 12-04-2009
Change: xecho: execute permission denied error

Hello,

I am have an issues with one of my scripts. I get the following error when I get to the point in the script where I am making the change. The change does take however. the error is "change: xecho: execute permission denied"

Everything was working properly until I start cleaning up the code. (indent) Smilie

Code:
ans=y
while [ "$ans" = "y" ]
do

	cat<<here0

${bold}Please enter the name of the user you want to change:${off}

here0

	read name

	clear

	grep -in "$name" phonebook | sed -n -e 's/^/\
				/' -e 's/:/\
				/gp'

	cat<<here1
	
${blink}${bold}Please enter the record that you want to change:${off}    

here1

	read number

record=`sed -n ${number}p phonebook`

name=`echo "$record"| cut -d: -f1`
address=`echo "$record"|cut -d: -f2`
city=`echo "$record"|cut -d: -f3`
state=`echo "$record"|cut -d: -f4`
zip=`echo "$record"|cut -d: -f5`
phone=`echo "$record"|cut -d: -f6`

	echo "Do you want to change $name's name? (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     			echo "Please enter new name"
     			read newname
     			name=$newname

	fi

	xecho "Do you want to change $address?  (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     			echo "Please enter new address"
     			read newaddress
     			address=$newaddress

	fi

	echo "Do you want to change $city?  (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     			echo "Please enter new city"
     			read newcity
     			city=$newcity

	fi

	echo "Do you want to change $state?  (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     			echo "Please enter new state"
     			read newstate
     			state=$newstate

	fi

	echo "Do you want to change $zip?  (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     			echo "Please enter new zip"
     			read newzip
     			zip=$newzip

	fi

	echo "Do you want to change $phone?  (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     		echo "Please enter new phone number"
     		read newphone
     		phone=$newphone
	

	fi

	sed "$number"d phonebook > phonebook.tmp
	mv phonebook.tmp phonebook
	echo "$name:$state:$city:$state:$zip:$phone" >> phonebook
	echo "Would you like to change another record? /c"
	read ans

done



---------- Post updated at 04:04 PM ---------- Previous update was at 03:14 PM ----------

Never mind I found the issue. It was a typo.

One other issue that I am having is when a user is not found in the file it hangs until the user presses return. How can I do some type of validation?

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

rm Permission Denied error

I am very new to Unix. We have a script that will remove files from a directory. The account removing the files has the same permissions as the directory the files are located. We have logged in as the account and deleted the files from that directory but when we run the script with the account... (7 Replies)
Discussion started by: Cech2002
7 Replies

2. UNIX for Advanced & Expert Users

getcwd: permission denied error

When I do a 'cd /appl' and issue 'ls -al' command, I get the following error for .. directory. ./..: Permission denied But still I get a listing of other directories under /appl. Also, if I give 'man' for any command under this /appl folder, I get the following error: ... (3 Replies)
Discussion started by: Deepa
3 Replies

3. Shell Programming and Scripting

xterm gives me permission denied error

When I try to run xterm at a command prompt in solaris 2.5.1, i'm getting a permission denied error. But the directory and user permissions look ok, they are part of a users group and then also root,sys,adm so what gives? Any ideas? Thanks! (1 Reply)
Discussion started by: kymberm
1 Replies

4. UNIX for Advanced & Expert Users

wat is execute permission denied???

hi, i have a problem and is needed by next week. when i need to run a program at the specified time using the crontab, after that the program which will send a messege to the screen using the say command, which will show "Hello" but there is an error when i run it, in the mail it show that ... (5 Replies)
Discussion started by: ckng
5 Replies

5. AIX

0403-006 Execute permission denied.

Hi i am running the below script in vio server, i changed to aix mode..then #./script1 </code> ##Set today Date as file name. vardate= date +"%m%d%y%H%M%S" varhost= hostname filename= "$varhost_$vardate" echo $filename </code> the output is ....... </code> # ./mount_test ... (6 Replies)
Discussion started by: honeym210
6 Replies

6. AIX

rm: execute permission denied in AIX

Hello All, We have an existing ssh set-up between 2 Unix servers ( Server A and Server B). Recently, we've had a problem where we cannot delete files (via app engine and even manually, after connecting thru ssh) on Server B. We manage Server A but Server B is handled by a different group, as a... (1 Reply)
Discussion started by: chipahoys
1 Replies

7. OS X (Apple)

Permission Denied Error with X11

Hello, I am using Tiger 10.4.11 I am trying out the GIMP, so I installed the X11 package from "Optional Installs" on the cd. Whenever I open X11, I get an error: xterm: could not exec /dev/null: Permission denied I have chmodded /dev/null to 777, as well as the /tmp directory. I deleted... (2 Replies)
Discussion started by: Ricardo-san
2 Replies

8. UNIX for Dummies Questions & Answers

Getting Error 0403-006 Execute permission denied.

Hi All, Need your help.. I am writing one script in which I am assigning value to one variable but when i am executing it is showing error "0403-006 Execute permission denied" below is the line of that script : INPUT_COUNT=wc $GIF_DIR/input/VID_RIMS.DAT | awk '{print $1}' and access... (2 Replies)
Discussion started by: NirajThakar
2 Replies

9. UNIX for Dummies Questions & Answers

Webserver permission denied error

Hello, I was trying a perl-cgi tutorial and saving the data from online form to a file named (guests.txt). I am using the localhost port 80 for practice. My page file "guestbook.html" is working as I saw the online form. After filled out the blanks and submit, I was expecting to see the result... (3 Replies)
Discussion started by: yifangt
3 Replies

10. HP-UX

Swinstall and rsync - execute permission denied

Hello, I have managed to install rsync using swinstall and also as far as I can tell the dependancies we didn't have. However when trying to execute the binary I get the following error :- />rsync sh: rsync: Execute permission denied. />which rsync /usr/local/bin/rsync... (10 Replies)
Discussion started by: YogaBija
10 Replies
secure_sid_scripts(5)						File Formats Manual					     secure_sid_scripts(5)

NAME
secure_sid_scripts - controls whether setuid and setgid bits on scripts are honored VALUES
Failsafe Default Allowed values Recommended values DESCRIPTION
This tunable controls whether and bits on executable scripts have any effect. Honoring on scripts make a system vulnerable to attack by malicious users. The default value for this variable is 1, indicating that bits are to be ignored by the execve(2) system call for higher security. The tunable can be set to 0 for a compatibility with older releases at the expense of security. Hewlett-Packard strongly recommends that you not change the value of this tunable unless there is an urgent need to do so. When a script with bits is executed, the kernel generates the following error message to both the terminal controlling and the system log. (To view the error message, use dmesg(1M) or inspect Who is Expected to Change This Tunable? Administrator. Restrictions on Changing Changes to this tunable take effect for new scripts started after the change. When Should the Value of This Tunable Be Changed? This tunable controls operational modes rather than data structure sizes and limits. The appropriate setting for a system depends on whether you consider security or compatibility to be most important. A value of is compatible with previous releases of HP-UX, but it is also less secure. A value of provides security against race condition attacks exploiting scripts. What Are the Side Effects of Changing the Value This tunable controls only executable scripts (not programs) with bit set. HP-UX does not ship with any such scripts. If the customer wishes to use scripts, third party applications such as or can be used. Alternatively, the shell script can be wrapped in a simple C pro- gram that runs the shell script with appropriate permissions: What Other Tunable Values Should Be Changed at the Same Time? None. WARNINGS
None. All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of HP-UX. Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation, some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tun- able values, consult the documentation for the kernel software being installed. For information about optional kernel software that was factory installed on your system, see at FILES
AUTHOR
was developed by HP. SEE ALSO
chmod(1), execve(2), kctune(1M). Tunable Kernel Parameters secure_sid_scripts(5)
All times are GMT -4. The time now is 08:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy