Source File Permissions

Christian Mauderer list at c-mauderer.de
Sun Apr 29 20:32:25 UTC 2018


Am 28.04.2018 um 21:45 schrieb Gedare Bloom:
> On Thu, Apr 26, 2018 at 7:52 PM, Joel Sherrill <joel at rtems.org> wrote:
>> Hi
>>
>> Teaching the class this week, i have noticed that randomly some
>> files are executable. I was going to change this but then realized
>> that we should all agree on what the permissions on the files and
>> directories in the tree(s) should be.
>>
>> I lean to either:
>>
>> + 664 for files and 775 for directories
>>
>> But could be talked into tighter permissions for group and world.
>> Whatever we do, it should be consistent and added to the Coding
>> Conventions.
>>
> 
> Your proposal is sensible to me.

Hello Joel,

I wouldn't really have a problem with these. But I think the more usual
ones would be 644 and 755.

If I create a new file using `touch somefile` in a directory with 775, I
still get a 644 file (at least on my Linux machine - I'm not sure
whether it is configuration dependant). I think that we will get a lot
of patches with "wrong" permissions if we use 664 and 775. So maybe it
would be good to have some reasons for using these wider group permissions.

The only setup that I could think of where such rights might could be
useful is one where one user updates the code while some other user (for
example a build bot) has to run a bootstrap to build the tree. But I'm
quite sure that even for that case, there are some better solutions
(e.g. one working tree that only pushes to a build bot tree).

Any special reasons, use cases or experiences where the 664 and 775
would be superior to 644 and 755?

Best regards

Christian Mauderer

> 
>> Thoughts
>>
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
> 



More information about the devel mailing list