Page 1 of 1

setting permissions?

Posted: Tue 14 Dec 2010 18:51
by snorkel
Hi,
Trying to use the SFTP makedirectory method and I want
to create the file with rwxrwx (770)

so I have

att:TScSFTPFileAttributes;

begin
att:= TScSFTPFileAttributes.Create;

att.Permissions:= [];
datamod.sftp.MakeDirectory(basepath,att);

what do I set att.permissions to?

Posted: Tue 14 Dec 2010 19:16
by snorkel
ok, sort of have this working:

att.Permissions:= [pR_USR,pW_USR,pX_USR,pR_GRP,pW_GRP,pX_GRP];

but it's not adding the Group Write perm to the directory

I am getting: RWXR X which is 750 octal instead
of RWXRWX (770 octal)

Am I doing this correctly?

Thanks,

Snorkel

Posted: Tue 14 Dec 2010 20:15
by snorkel
ok, I got it to work by setting the attributes after the directory is created instead of using the second param of the makedirectory method.