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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Permission Denied Error when invoking custom extension

wposner-2
14-Alexandrite

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!

ACCEPTED SOLUTION

Accepted Solutions
wposner-2
14-Alexandrite
(To:wposner-2)

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

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

wposner-2
14-Alexandrite
(To:ankigupta)

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.

wposner-2
14-Alexandrite
(To:wposner-2)

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.

Announcements


Top Tags