cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Permission Denied Error when invoking custom extension

wposner-2
12-Amethyst

Permission Denied Error when invoking custom extension

Has anyone encountered a permission denied error when trying to invoke a custom extension for TWX hosted on a Unix platform?  My team has created an extension that encrypts a file within a repository.  It works fine on a windows instance of Tomcat, but when we try to run it on a Unix hosted instance, we get the following:

Unable to Invoke Service AddFilesWithEncryption on EncryptionExtension : java.io.FileNotFoundException

followed by Permission Denied.

If you've encountered this, what folder typically needs to have its security permissions changed and to what?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

The issue had to do with creating the instance of the zipped/encrypted file.  It was defaulting to the root folder to which tomcat does not have access.  Once we added code to specify the repository path, the error went away.

View solution in original post

3 REPLIES 3
ankigupta
5-Regular Member
(To:wposner-2)

Hi Wayne Posner​,

I haven't encountered this but by looking at the error it seems that Permission to access the directory/file by the tomcat user is missing. Here the directory refers to the folder where files to be encrypted are placed.

I hope it helps.

Thanks,

Ankit Gupta

It's definitely permissions. But what doesn't make sense is that the extension is using TWX open and write APIs to read a file from a repository, encrypt it and then write it back.  I've checked the folder and it has all the correct permissions and all the files inside the folder have matching permissions. The extension just can't create new files for some reason. I wonder if PTC doesn't set up their cloud unix boxes with the ACLs in place for extensions to have the correct write permissions.

The issue had to do with creating the instance of the zipped/encrypted file.  It was defaulting to the root folder to which tomcat does not have access.  Once we added code to specify the repository path, the error went away.

Top Tags