GlobalSCAPE Website
Products Solutions Downloads Support Store News GlobalSCAPE Blog Company

GlobalSCAPE User Forum

Forums Register Login My Profile Inbox Address Book My Subscription My Forums

Member List Search Calendars FAQ Ticket List Log Out

Retrieving folder permissions via ComAPI

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [EFT Server] >> EFT Server Scripting >> Retrieving folder permissions via ComAPI Page: [1]
Login
Message << Older Topic   Newer Topic >>
Retrieving folder permissions via ComAPI - 5/9/2007 6:53:54 AM   
thomas.liebald

 

Posts: 1
Joined: 5/9/2007
Status: offline
Hi there,

I'm having a little trouble when I want to retrieve the folder permissions via GetFolderPermissions as mentioned in the COM Reference:

Listing folder permissions with the COM interface
Use the ICISite interface GetFolderPermissions method to retrieve a list of all folder
permissions, including inherited permissions.
HRESULT GetFolderPermissions(
[in] BSTR bstrFolder,
[out, retval] VARIANT *aPermissions);
 
 
We are using GSFTP V3.1.3.
 
I have written a little script to show what's happening:
 
Set objFTPServer = WScript.CreateObject("SFTPCOMInterface.CIServer")
'server credentials
strServer = ""
intPort = 1000
strUserName = ""
strPassword = ""
'connect to server
On Error Resume Next
objFTPServer.Connect strServer, intPort, strUserName, strPassword
If Err.Number <> 0 Then
WScript.Echo "Error connecting to '" & strServer & ":" & intPort & "' -- " & err.Description & " [" & CStr(err.Number) & "]"
WScript.Quit(255)
Else
WScript.Echo "Connected to " & strServer
End If
On Error GoTo 0
'get sites info
Set objSites = objFTPServer.Sites
Set objSite = objSites.Item(0)
'get folder permissions
arrPerms = objSite.GetFolderPermissions("/") 'get permissions from root folder
If IsArray(arrPerms) Then
For intItem = LBound(arrPerms) To UBound(arrPerms)
WScript.Echo(arrPerms(intItem)) '<-- the error occurs here (Type Mismatch)
Next
End If
'cleanup
objFTPServer.Close
Set objSite = Nothing
Set objSites = Nothing
Set objFTPServer = Nothing
 
When you run this script it throws an error in line 28: Type Mismatch: 'arrPerms'
 
How can these permissions be accessed?
 
Regards
Thomas
 
 
 
 
 
 
 


< Message edited by thomas.liebald -- 5/9/2007 7:26:33 AM >
Post #: 1
RE: Retrieving folder permissions via ComAPI - 1/13/2009 12:55:48 PM   
michael_hornung

 

Posts: 1
Joined: 1/13/2009
Status: offline
Is there any additional information on this?  Solutions or bug fixes?

I'm running Globalscape Secure FTP Server version 3.1.5 and I too am having trouble using output from GetFolderPermissions().  Thoughts?

(in reply to thomas.liebald)
Post #: 2
RE: Retrieving folder permissions via ComAPI - 1/15/2009 6:05:08 PM   
ON AIR

 

Posts: 201
Joined: 5/18/2005
Status: offline
What output are you getting and how are you calling it.

ON AIR

(in reply to michael_hornung)
Post #: 3
RE: Retrieving folder permissions via ComAPI - 2/17/2009 12:33:56 PM   
Redrix

 

Posts: 5
Joined: 1/22/2009
Status: offline
quote:

For intItem = LBound(arrPerms) To UBound(arrPerms)
WScript.Echo(arrPerms(intItem))


intItem is a Hash object. You need to further disect it to get the parameters and values.

-Redrix

(in reply to thomas.liebald)
Post #: 4
Page:   [1]
All Forums >> [EFT Server] >> EFT Server Scripting >> Retrieving folder permissions via ComAPI Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.5.5 Unicode

0.172