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,

-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

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.

1 Like

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:

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

1 Like

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

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

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.