Joy Conner
2nd February 2010, 16:13
I am running Baan4c4 in a unix environment and trying to use the command file.rm. The return value if -1 and the value of e is 2.

Here is my code:
function long delete.file(const string path())
{
long ret
ret = file.rm(path)
return(ret)
}

path stores the "host!/full path/file name"

I have considered this being a permission issue but appears to not be the case. I am running this as a super user and member of bsp group. The file is owned by bsp and permissions are granted to the bsp group.

To take this one step further, I logged on to unix system as myself and removed the file.

Does anyone have other suggestions?

Thanks in advance for your help.

Hitesh Shah
2nd February 2010, 17:09
Sometimes remote users are configured with common user like bsp and that user id for bsp on both server may be different.

U can also try shell("rsh trghost pat2remove" ,0 ) if u can not resolve file.rm.