Script without execute permissions will work for a user?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Script without execute permissions will work for a user?
# 1  
Old 07-21-2015
Script without execute permissions will work for a user?

Please help me to understand the issue:

Issue: There are shell scripts in a user home directory (/home/user_1)
without execute permissions (rw-r--r--) to owner,group and world
These shell scripts were able to execute/work previously but its not working now and it says permission denied or cannot execute. /home/user_1 is located in NAS path and this shifted to new NAS location now.After this scripts are expecting execute permissions now to work. Script dont work without changing permissions.. Please help me to understand why its happening
# 2  
Old 07-21-2015
Scripts can't be executed without execute permission. However, they can be sourced using either the source command/builtin or the equivalent . .
Please show us how EXACTLY the scripts were run before the move.
# 3  
Old 07-21-2015
How was the move performed? If it was using a cp and then a delete when you were happy, was the -f flag used to preserve the metadata (ownerships, permissions, timestamps etc.)

It may be that you have lost the metadata and you will need to work out what to set again.




Robin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to give a user sudo permissions

Can some one please let me know a script which gives the user sudo permissions? Thanks in advance.... (6 Replies)
Discussion started by: Revanth547
6 Replies

2. Shell Programming and Scripting

Need to execute a script by one user at a time

Hi , I have a script which everyone have access but I need that the script should be ran by one user at a time. The second user who is trying to execute the script should get a message stating that the user is already executing the script. Is there any way to achieve this.? Thanks in advance. (2 Replies)
Discussion started by: rogerben
2 Replies

3. Shell Programming and Scripting

Script to find the user of a file and permissions

I have a list of files in a.txt file. For each of the files listed in that file, I would like to obtain the owner of the file and also, the permissions associated with that file. If possible, the group the owner belongs to as well. Can someone help me with a script to find that out. (1 Reply)
Discussion started by: ggayathri
1 Replies

4. Solaris

Why user has permissions to execute 'init 0'?

Hi all. On one workstation run Solaris 10 a simple user can to execute 'init 0' command without input (su and root password). Example: % init 0 % OK I don't understand how user can execute 'init 0' command on this workstation? 1) I checked /usr/local/etc/sudoers all lines are... (6 Replies)
Discussion started by: wolfgang
6 Replies

5. Shell Programming and Scripting

root user command in shell script execute as normal user

Hi All I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh URL="www.google.com" VBURL="10.5.2.211" echo "Setting route for $URL for GPRS" URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1` echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies

6. Shell Programming and Scripting

Change user on remote machine and execute script!

Hi, I need to login into remote server and execute a shell script over there. As of now i am making use of ssh command ssh primUser@135.254.242.2 sh /poll.sh I am logging in as primUser but unless i change the user to root the script execution on the remote machine is not possible. ... (5 Replies)
Discussion started by: goutham4u
5 Replies

7. Shell Programming and Scripting

shell script to execute user command

I don't know why the following shell script doesn't work. Could you please help me out? #!/usr/bin/ksh test="cal > /tmp/tmp.txt 2>&1" $test I know it will work for the following format: #!/usr/bin/ksh cal > /tmp/tmp.txt 2>&1 However, I need to get the command from the user in... (1 Reply)
Discussion started by: redtiger
1 Replies

8. Shell Programming and Scripting

Modify Perl script to work with txt - Permissions script

Hi I have this code, and i want work with a ls -shalR output in .txt What i need read to do this?? Where start? #!/usr/bin/perl # Allrights- A perl tool for making backups of file permissions # Copyright (C) 2005 Norbert Klein <norbert@acodedb.com> # This program is free... (1 Reply)
Discussion started by: joangopan
1 Replies

9. Shell Programming and Scripting

Execute internal script as different user

I have a script that I must run as user X and need to send the results to a different server as user Y (sftp). User Y has been set up to not require password authentication between the 2 servers. I would prefer to keep these in a single script, as our operations might have to run it from time to... (6 Replies)
Discussion started by: aubtc
6 Replies
Login or Register to Ask a Question