coltom Posted March 5, 2012 Posted March 5, 2012 SC running via TomCat on a physical image server box and working fine. I've scripted a delete button that should first delete the SC file and, if 1 is returned, continue to delete the portal row (containing a container generated via SCGetContainer): # Check for SuperContainer plugin installation # Exit if plugin is not installed If [ SCVersion = "?" ] Show Custom Dialog [ Message: "SuperContainer Plugin is not installed"; Buttons: “OK” ] Halt Script End If # Set Variable [ $result; Value:SCDelete ( SCGetContainer ( "images/" & IMA_image::__pk_image_ID ) ) ] If [ $result = "ERROR" ] Show Custom Dialog [ Message: "An error occurred: " & SCLastError; Buttons: “OK” ] Else If [ $result = "1" ] Show Custom Dialog [ Message: "SC file deleted."; Buttons: “OK” ] Delete Portal Row End If # I keep getting Error 500 returned which I believe is a permissions problem on the Image Server running MS Server 2008. Does anyone know how I should set the permissions on Server 2008 to allow SC to delete the file?
ooparah Posted March 5, 2012 Posted March 5, 2012 SuperContainer should be running as the account under which it was installed/deployed and that account must have both Read and Write permissions to the folder containing the SC files (by default, this is "/Users/Shared/SuperContainer on Mac and "C:Documents and SettingsSuperContainer on Windows). So, I first suggest making sure SC has the proper permissions to read and write to the folder, then ensure that a file actually exists in the folder that you are trying to delete. I hope this helps,
coltom Posted March 6, 2012 Author Posted March 6, 2012 Thanks. A few things.. 1. When specifying the filepath for SCDelete should I use "Files" or replace with "RawData"? 2. In the SC/Files/images folder each folder is given the FMP ID while the image file within has kept it's original name - is this behaviour correct? 3. If 2 above is correct then SCDelete actually deletes the folder containing the image plus image file within - correct? 3. WIth reference to your point 'making sure SC has the proper permissions'. If Tomcat and SC had been installed on the Server2K8 box by an administrator with 'full control' then wouldn't SC inherit the administrator's 'full control' too? I think there's a problem with SC having the correct permissions to delete files but even my IT person hasn't been able to work out why not. I think I need a Server2K8 expert.....
ooparah Posted March 8, 2012 Posted March 8, 2012 1. When specifying the filepath for SCDelete should I use "Files" or replace with "RawData"? The SCDelete() function takes a "folderPath" as the parameter, not a full SC path. Full SC Path: "http://yourserver.com:8020/SuperContainer/Files/Path/To/My/File" folderPath: "/Path/To/My/File" Thus, a folderPath is essentially everything AFTER the "Files/" servlet type. 2. In the SC/Files/images folder each folder is given the FMP ID while the image file within has kept it's original name - is this behaviour correct? Yes. The FMP ID as the folder name was assigned based off of the SC folderPath the developer of the database specified: "/images/" & MyDatabase::FMP_ID (for instance) The image/file name that is placed within that folder does retain the original image/filename. So the answer to your question is, "Yes." This is the default and expected behavior. 3. If 2 above is correct then SCDelete actually deletes the folder containing the image plus image file within - correct? Yes. 4. WIth reference to your point 'making sure SC has the proper permissions'. If Tomcat and SC had been installed on the Server2K8 box by an administrator with 'full control' then wouldn't SC inherit the administrator's 'full control' too? Yes. SuperContainer should have the same access rights as the account that it was installed/deployed under. I think there's a problem with SC having the correct permissions to delete files but even my IT person hasn't been able to work out why not. I think I need a Server2K8 expert..... Hmm, this may be a job for a screen sharing session. If you have ensured that SuperContainer has the proper rights to both read and write to the SuperContainer directory, then I would be more than happy to help troubleshoot this issue with you over a screen sharing session. I am available Monday through Friday, 10am - 6pm ET (GMT -5). Regards,
coltom Posted March 15, 2012 Author Posted March 15, 2012 The SCDelete() function takes a "folderPath" as the parameter, not a full SC path. Full SC Path: "http://yourserver.co...Path/To/My/File" folderPath: "/Path/To/My/File" Thus, a folderPath is essentially everything AFTER the "Files/" servlet type. Got it - I was using the full SC path rather than the folderpath! Why is there a need to use two different paths - a full SC path for web viewer(s) and then this truncated folder path for the delete function? Is there a functional requirement or is an attempt to 'simplfy' things? Anyway, either way thanks for help.
Recommended Posts
This topic is 4636 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now