setting permissions?

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
snorkel
Posts: 384
Joined: Tue 08 Aug 2006 15:10
Location: Milwaukee WI USA

setting permissions?

Post by snorkel » Tue 14 Dec 2010 18:51

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?

snorkel
Posts: 384
Joined: Tue 08 Aug 2006 15:10
Location: Milwaukee WI USA

Post by snorkel » Tue 14 Dec 2010 19:16

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

snorkel
Posts: 384
Joined: Tue 08 Aug 2006 15:10
Location: Milwaukee WI USA

Post by snorkel » Tue 14 Dec 2010 20:15

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.

Post Reply