4 Replies Latest reply on Jul 12, 2012 7:40 AM by Bill Robinson

    BladeLogic NSH Script to Copy files from server to NAS

    Steven Alexson

      I have 2 Linux servers, serverA and serverB.


      serverA has files that I would like to copy to NAS mounted on serverB. The NAS is mounted to serverB by local server id "nasmnt". This means that only the id "nasmnt" can write to the NAS.


      I am trying to write an NSH script to be run as a BladeLogic NSH Script Job to copy files from serverA to the NAS mounted to serverB. I am having a problem with permissions when running the NSH script.


      The script simply runs the command:


           cp -v "//serverA/file_path/*.err" "//serverB/NAS_path"


      When the job runs, it fails on the copy command with a permission denied error. On the servers, the BladeLogic role maps to "root". I have tried changing the role to map to "nasmnt" on serverB. I still get "permission denied".


      When I log into serverB via SSH and su to "nasmnt", I can successfully right files to the NAS.


      On serverB, I have tried changing the BladeLogic agent's "exports" file to read:


           *     rw,user=nasmnt,rootdir=/NAS_path


      This didn't seem to have any impact on the behavior.


      My question is...


      How do I get an NSH script to copy files from one server to NAS mounted on a different server when the NAS is mounted as a system id other than root? root CANNOT write to this NAS.