Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to rsh a shell script from OpenVms to a Red Hat linux. It seems that it is not executed.

I created the shell script in OpenVms and Ftp it to the linux. I then ls -la the folder in linux:

-rw-r--r--    1 buedev   buedev        382 Jul 20 11:03 files.sh

It seems that even the owner don't have the right to execute. And if we need to chmod it, how can we do it remotely in OpenVms?

share|improve this question
up vote 2 down vote accepted

In order to execute, the execute bit must be set. Even the owner of a file cannot ask the system to execute it if it's not marked as executable.

The one caveat here is that in the case of most shell scripts, you can execute them by calling the shell yourself and feeding the script data to it as an argument.

/bin/sh /path/to/files.sh

This would execute the sh shell and send it the text data for your script to be executed. This only requires read-permission on the file because the shell is what is being executed and it only needs to read the script not execute it.

You can change the permissions of files that will be written by setting the umask in your ftp preferences, or use a shell later to chmod them. Some ftp daemons also support changing the permissions on existing files.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.