Permission denied running shell script in opensuse


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Permission denied running shell script in opensuse
# 1  
Old 01-10-2015
Permission denied running shell script in opensuse

Hello,

I am having an odd problem in open suse 12. I have a shell script and when I try to run it, I get "permission denied" The permissions from ls -l are,
Code:
-rw------- 1 user1 users  25904 Jan 10 16:26 script.sh

I have tried to change the permissions in dolphin but this does not change the output of ls -l. I have also tried chmod 777 and that also does not change the chmod output. Even if I log in as root, I still get permission denied and cannot change the permissions with chmod or in dolphin.

This is an ntfs partition that I share with a windows installation and with other linux installs on the same machine. Earlier, I was running this script from an open suse VM from inside windows and the script runs fins.

I'm not sure what I am doing wrong here.

LMHmedchem
# 2  
Old 01-10-2015
ntfs is a windows file system. nothing wrong with storing files to be shared, but linux scripts don't belong there. by the same token, windows *.exe files don't belong on a linux file system.
You could copy the script to where you are in linux (/home/user/), and chmod +x ./scriptname.sh, and then run it in the correct environs.

Last edited by ongoto; 01-10-2015 at 06:51 PM..
This User Gave Thanks to ongoto For This Post:
# 3  
Old 01-10-2015
I don't know what "dolphin" is in this context.

If the chmod is failing, you either don't have permission to change the mode or the filesystem is mounted read-only on the machine you're on. Either way, as long as you can read the script, you should be able to execute it using:
Code:
sh script.sh

as long as you are running as user1. (If you aren't running as user1 or root, you don't have permission to read the file and your shell won't be able to execute a file it can't read.)
This User Gave Thanks to Don Cragun For This Post:
# 4  
Old 01-11-2015
Quote:
Originally Posted by Don Cragun
I don't know what "dolphin" is in this context
Dolphin is the gui file manager in opensuse. It it probably more correct that it is the file manager for kde.

Most of this was when I was logged in as root, so it's hard to see why I wouldn't have permissions. I don't think that the drive is mounted as read only because I was able to compile an app from a src code directory on the same shared partition. This is the main thing I use the partition for, as a place that is available from any OS I boot into. I usually do this from a VM, but I wanted to test this app on non-virtualized hardware.

I was able to copy the directory to /home and get the script to run there, so thanks to ongoto for that suggestion.

I have now had another odd issue. I copied a folder off of the shared directory into /home and when I try to open the directory in dolphin, dolphin freezes and then quits. I can navigate into the folder from a terminal, so I'm not sure what is up with that. The folder with the script copied over just fine, so I am finding this confusing.

LMHmedchem
# 5  
Old 01-11-2015
Quote:
Originally Posted by LMHmedchem
Most of this was when I was logged in as root, so it's hard to see why I wouldn't have permissions.
One possible reason for such a behavior is an NFS-mount. Because "root" here is not "root" there you seem to own a file which you still cannot access.

Without knowing the details of your system it is difficult to find out the real reason but you may investigate in this direction.

I hope this helps.

bakunin
# 6  
Old 01-11-2015
It's strange that Dolphin would freeze up like that. It's pretty robust.

Try as a normal user to launch Dolphin from a terminal. You should get a bunch of error messages. That might give you some clues??

Windows doesn't store or preserve file and folder permissions the same way linux does. Different umasks I believe. I'd be checking that sorta stuff too.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

Permission denied

Trying to get date into the txt file. It says Permission denied. echo $(date +%I:%M:%S_%D) >> /tmp/systemd_suspend_test_err.txt exec 2>> /tmp/systemd_suspend_test_err.txt if ; then # Do the thing you want before suspend here echo "we are suspending $(date +%I:%M:%S_%D)." elif ;... (5 Replies)
Discussion started by: drew77
5 Replies

2. Shell Programming and Scripting

Trying to create a script to run as root, permission denied

Hello all, I am trying to create a script or a .command file that will run for me and my other techs on many, many Mac OSX computers that will add a file to the /etc/ folder called /etc/launchd.conf Every time I try to run the script, I get "Permission Denied" when trying to put the file into... (13 Replies)
Discussion started by: DonnieNarco
13 Replies

3. Solaris

Script running even after execute permission removed.

Hi All, I'm new to solaris and this site but the advices in this site have helped me a lot. Today i am facing a new issue. We have a script for BMCDashboard and this script is not supposed to run evrytime the server is booted so we disabled the services and removed the execute... (7 Replies)
Discussion started by: Rockyc3400
7 Replies

4. Shell Programming and Scripting

Help with Permission Denied on script with sed

I am trying to develop a script to replace a lowercase URLs with an upper case URLs in HTM files. Basically.. replace href="somelowercaseurl" with href="SOMEUPPERCASEURL". In place. the href's are not located in any specific position in the file. Here is my shell script : export... (5 Replies)
Discussion started by: smarty
5 Replies

5. UNIX for Dummies Questions & Answers

Shell Scripting Permission Denied

Everytime I try to run a shell script I get the error message permission denied. So I have googled/searched around and have been using the command chmod u+rwx (filename) to give myself permission to execute my program. However, I was wondering if there was anyway to actually just this to... (5 Replies)
Discussion started by: Jimmyd24
5 Replies

6. Shell Programming and Scripting

shell script and Permission denied

Have the following in a .sh file. printf "Installing ... \ r" cd $ ORG_DIR / a_a . / configure> error.log Make 1> error.log 2> error.log make install> error.log But when I run I get the following. install.sh: line 270:. / configure: Permission denied make: *** No rule two make target... (3 Replies)
Discussion started by: Mumie
3 Replies

7. Red Hat

Permission denied

Hi guys im new to this db i have a small prob while installing websphereportal6.1i think i was installed succesfully but the error im getting is while starting server. check this out # ./serverStatus.sh -all Error loading: /usr/wps61/AppServer/java/jre/bin/classic/libjvm.so: cannot... (1 Reply)
Discussion started by: varma917989
1 Replies

8. Shell Programming and Scripting

Executing expect script giving message as bad interpreter: Permission denied

Hi Gurus, I am new to scripting and needs your help in expect script used for telnet. I wrote a simple script as #!/usr/bin/expect-5.43 -f spawn telnet localhost 2233 expect "password:" send "secret\r" send "i data.cnbc.com\r" send "exit\r" expect eof When I am trying to execute... (2 Replies)
Discussion started by: niks_yv
2 Replies

9. UNIX for Dummies Questions & Answers

Why do I keep getting .:Permission denied?

I'll start off by saying that I know very little about Unix - however, I do know that I have a .profile file in my home directory, and that I should be able to invoke it by typing . profile. However, when I do this for ANY .filename, I get ".: Permission denied". I'm pretty sure that there is... (12 Replies)
Discussion started by: bbersani
12 Replies

10. UNIX for Advanced & Expert Users

Permission denied

Hi, I can not execute a .env file $ . /Data/oracle/d03/mydbora/8.0.6/MYDB.env -bash: /Data/oracle/d03/mydbora/8.0.6/MYDB.env: Permission denied Even if : -rwxrwxrwx 1 oracle dba 2903 Mar 5 2007 /Data/oracle/d03/mydbora/8.0.6/MYDB.env Please help. Many thanks. (1 Reply)
Discussion started by: big123456
1 Replies
Login or Register to Ask a Question