freefall
Contributor
Contributor

copy file from vco to guest failure?

Hi

I am running VCO 5.1 appliance in a vsphere 5.1 environment.

I am attempting to write a file to a guest machine. I have tried using both Local Administrator and Domain Administrator credentials but in both instances I receive the following:

No permissions on the file for the attempted operation (Workflow:test workflow / Scriptable task (item1)#15)

I have tested that I can indeed logon.

I have tested that I can check for a directory.

I have tested that I can create a directory.

All work fine. I just can't appear to create the file.

I ran proccess mon on the guest when I ran the workflow (outputprocmon.txt)

So I can see it is trying look at the directory and the file but for some reason is getting a permission denied??

I can log onto the guest as either a domain admin or local admin and create a file in this directory.

Is the file being created as the user passed through or as the account running the vmtools?

Test script is:

parameters [string]userName, [secureString]password, [VC:VirtualMachine]vm

var host = vm.sdkConnection;
var guestOperationsManager = host.guestOperationsManager;
var guestAuth = new VcNamePasswordAuthentication();
guestAuth.username = userName;
guestAuth.password = password;
var fileManager = guestOperationsManager.fileManager;
myResult = false;
overwrite = false;
var attr = new VcGuestFileAttributes();
//var srcFile = new File(vcoPath);
var srcFile = "/scripts/blah.txt";
var guestFilePath = "C:/bin/blah.txt";
var uri = fileManager.initiateFileTransferToGuest(vm , guestAuth ,guestFilePath, attr, srcFile.length, overwrite);
myResult = fileManager.putFile(srcFile, uri);
System.log("Result is: " + myResult);

Oh and the path /scripts on the vco appliance is a ntfs mount rw,hard,intr

Any assistance greatly appreciated.

Sam

Tags (1)
4 Replies
freefall
Contributor
Contributor

Update

I have found that there was a file in the app install directory that needed to be modified to allow Javascript (vco) to read the local file system. What now happens is that the workflow now just returns false?

It appears to me that a file is created, vmwareX where x is an integer number and then deletes it as per the output attached to the original posting.

Guest Operating System is Windows Server 2008 R2 SP1.

??? Any help?

0 Kudos
pallilsh
Contributor
Contributor

I'm having the same issue, I searched for any documentation on this and didn't really find any. Did you solve your problem? What file needed to be modified in what way on the VCO server?

0 Kudos
freefall
Contributor
Contributor

Hi the file in question is js-io-rights.conf and is located in the $INSTALLDIR/app-server/server/vmo/conf directory.

The file holds the permissions that Javascript can exercise on the file system.

You need to add the path to this file for where you want to Read/Write/Execute your files to/from.

NOTE: the file does not exist until you try to read/write a file to the local vco server.

NOTE: you need to restart the vco service once the file is edited

Format of the file looks like:

-rwx c:/

+rwx c:/orchestrator

+rx ../../configuraiton/jettv/logs/

Format is:

     +/-     Add or remove priveleges

     r        Read Access

     w       Write Access

     x       Execute Access

     C:/     Specific Path to directory or file

     ../      Relative Path to directory or file

Hope this helps

Message was edited by: freefall

ncolyer
Enthusiast
Enthusiast

I just ran into something similar today and wrote a guide on my blog on how to work around this. There are a few steps you need to complete, including those listed by freefall above.

Here's the post: http://v-nick.com/?p=186

Let me know if it helps.

Nick

0 Kudos