UNSOLVED

StormyB

updated

8 years ago

S

StormyB

1 Rookie

10 Posts

0

3258

March 15th, 2018 08:00

Simple script

Hello,

   I'm trying to do something real simple on Isilon version 8.0.0.4...  and I can't get it to run the right way...

I have tried many iterations...  Permissions are all good but I am at a loss...

I can put zsh newtest.sh  &  bash newtest.sh successfully,  but not ./newtest.sh

I can do this as root or as a user and the same results listed above...

Here is the script...

#!/bin/bash

#!/usr/bin/env bash

/usr/local/share/CLI/isi snapshot snapshots lists --state all

The error is:

zsh: permission denied:  ./newtest.sh

I've done this without the full path, without the env line...

Can someone please tell me what I'm doing wrong?

Thanks

MB

  • crklosterman

    450 Posts

    2370

    0

    Posted March 19th, 2018 08:00

    It's actually pretty simple.  Assuming you save the script under the /ifs filesystem, you'll never be able to run it directly with ./ifs/scriptname.sh .  Why?  Because /ifs is mounted with noexec, but running it with simply /bin/zsh /ifs/scriptname.sh works just fine and you can put it in cron that way if you want.  Just be aware that that cron jobs on Isilon are a bit different.  They have to be put into /etc/local/crontab.local .

    isilon3-1# mount | grep /ifs

    OneFS on /ifs (efs, local, noatime, noexec)

    -------------------------------  A quick example:-------------------

    isilon3-1# echo "isi_for_array uptime" >> /ifs/uptimescript.sh

    isilon3-1# /bin/zsh /ifs/uptimescript.sh

    isilon3-1:  4:55PM  up 4 days,  1:55, 1 user, load averages: 0.47, 0.40, 0.34

    isilon3-2:  4:55PM  up 4 days,  7:12, 0 users, load averages: 0.37, 0.40, 0.34

    isilon3-3:  4:55PM  up 55 days, 22:42, 0 users, load averages: 0.39, 0.39, 0.38

    Make Sense?

    ~Chris Klosterman

    Principal Pre-Sales Engineer, Datadobi

  • StormyB

    1 Rookie

    10 Posts

    2370

    0

    Posted March 19th, 2018 10:00

    Hello Chris,

    Thanks for the reply…

    OK I can do it this way… It is to go in a scheduler named Control M…

    I just thought that I could put the zsh in a script without having to call it preface it with zsh…

    Thanks for the clarification,

    MB