[Development] [QLockFile] Whether it is reasonable to use 0644 permission ?

Denis Shienkov denis.shienkov at gmail.com
Thu Jul 28 08:34:03 CEST 2016


So, as I understand, you agree that QLockFile should be fixed.. Who will 
produce a patch? Thiago, maybe you can do it? :)

PS: Because I do not understand an idea with the umask... I simply would 
replace 0644 with 0666 in sources... and nothing more..

28.07.2016 0:23, Thiago Macieira пишет:
> On quarta-feira, 27 de julho de 2016 22:15:45 PDT Kevin Kofler wrote:
>> Thiago Macieira wrote:
>>> If you don't have permission to delete it, then you're going to have a
>>> problem to drop your own lock if you steal the lock by writing to the
>>> file.
>> So this means that the permission should be 0644 to prevent that from
>> happening. Thus, I don't understand how you get to:
> The permission of the file is irrelevant. The permission of the dir is the one
> that matters.
>
>>> Either way, the mode in the call should be 0666.
> Because that will result in 0644 or 0664, depending on the user's umask. The
> correct modes for creat() and open() should be only 0600, 0700, 0666 and 0777.
> Anything else is suspicious and probably wrong. Like this case.
>




More information about the Development mailing list