Setting file permissions with SetAttributes - WeOnlyDo Discussion board

Setting file permissions with SetAttributes (General questions)

by KevinKay, Wednesday, February 02, 2005, 20:49 (7031 days ago)

If I only need to set file permissions, can I do this without a prior GetAttributes (and its callback) by nulling the other attributes? From the manual, I would expect this to work:

SetAttributes (handle, pRemotePath,
(__int64) -1, -1L, -1L, 0666L, NULL, NULL);

Is this sufficient or is there some other subtle gotcha?

Re: Setting file permissions with SetAttributes

by wodSupport, Wednesday, February 02, 2005, 21:07 (7031 days ago) @ KevinKay

Kevin,

that's should do it, except 666L. 666 octal is 438 decimal, so use 438 instead.