Copying file to '/usr/local/neolane/nl6/var/<instance_name>/<file_name.extension>'

Avatar

Avatar

somasundaramh14

Avatar

somasundaramh14

somasundaramh14

30-10-2018

Hi,

I've been trying to copy a file from outbound of FTP and copy to 'Public File Resources' in Adobe Campaign Classic. And I was able to copy the file using the following command.

var serverFileResourceLocation = "/usr/local/neolane/nl6/var/<instance_name>/<file_name.extension>";  

if (!file.copyTo(serverFileResourceLocation)) 

     logError ("File '" + file.name + "' was not copied"); 

else

     logInfo('copied successfully');

The same was working in Sandbox instance. And in another instance that fails and gives the follwing error.

Error: "BAS-010015 Cannot open file '/usr/local/neolane/nl6/var/res/stage1/896058c047415b9ec73256866fa2e447.pdf' with write access (errno=2, No such file or directory)"

I've tried giving Read/Write/Delete permission to the operators for 'Public Resources folder' and still it didn't resolve the issue.

I've used the following forums for my references:

I want to Upload images to Public resources every morning. Is it possible to automate this process.

Re: Automate Report Sending

I've spent some days to resolve this and still no fruit. Any help will be much appreciated. Thanks in advance.

View Entire Topic

Avatar

Avatar

somasundaramh14

Avatar

somasundaramh14

somasundaramh14

31-10-2018

Debabrata.T, I tried to escape special characters using the following options. Still didn't help.

  • //usr//local//neolane//nl6//var//res//my_instance_name//my_file.pdf
  • \/usr\/local\/neolane\/nl6\/var\/res\/my\_instance\_name\/my_file.pdf
  • \\usr\\local\\neolane\\nl6\\var\\res\\my\_instance\_name\\my_file.pdf
  • escape('/usr/local/neolane/nl6/var/res/my_instance_name/my_file.pdf')

I wonder the issue is with write access.

Error: "BAS-010015 Cannot open file 'file_path' with write access (errno=2, No such file or directory)"

I confirmed the server path is: "/usr/local/neolane/nl6/var/res/stage1/" using querydef. So the issue is with the write access only I guess.