OK, so this is what I have so far:
//Add Group Folder Perms
function groupfolderperm(groupName ) {
var config = system.getConfig();
var group = config.groups.get(groupName);
var folder = config.folders.get("D:\\FTPData\\Users\\%HomeBaseFolder%");
folder.access.group.groupName = "mygroup";
folder.access.group.permissions = [ "FileRead,FileWrite,FileAppend,FileRename,FileDelete,FileExecute,DirList" ];
config.applyChanges();
}
Unfortunately it cannot resolve %HomeBaseFolder%:
groupfolderperm TESTGROUP
error: command 'groupfolderperm TESTGROUP' failed: Invalid argument: Path must be absolute: D:\FTPData\Users\%HomeBaseFolder%
Any idea how I can add the name of the folder as a variable as this location depends on the user&group that the script is running on behalf of?
I have also written the following to add the owner & permissions for the two accounts that need access to these folders:
//Add more2 as owner & set permissions
function folderowner(userName) {
var user = config.users.get(userName);
var folder = config.folders.get("D:\FTPData\Users\%HomeBaseFolder%\FromMore2");
folder.access.owner.user.permissions = [ "FileRead,FileWrite,FileAppend,FileRename,FileDelete,FileExecute,DirList" ];
config.applyChanges();
}
//Add client user permissions
function folderclient(userName) {
var user = config.users.get(userName);
var folder = config.folders.get("D:\FTPData\Users\%HomeBaseFolder%\FromMore2");
folder.access.user.permissions = [ "FileRead,FileWrite,FileAppend,FileRename,FileDelete,FileExecute,DirList" ];
config.applyChanges();
}
But from what I can tell, these won't work due to the same issue?
Thanks again for your help so far,
Johnny