Mark H Weaver <m...@netris.org> writes:

> Alex Vong <alexvong1...@gmail.com> writes:
>
>> Running ``LC_ALL=C grep -r chmod'' on ``guix/gnu/packages'', gives the
>> following result. As you can see, various modes are used, such as 644,
>> 755, 555, 666, 777, 664. Do we have a guide on which mode should be
>> prefered? I personally always used 644 for non-executable files, and 755
>> for directories and executable files. Any idea?
>
> I agree that it would be good to have some guidelines for this, and for
> most purposes, I agree that 644 and 755 are good choices.  In some
> cases, it might make more sense to use 444 or 555.  It's probably
> inadvisable to use 666 or 777.
>
> However, it should be noted that when files are added to the store,
> their modes are canonicalized to one of only two possible values: 444
> and 555.  Directories in the store always have mode 555.  In the NAR
> format, there's only one permission bit (executable) stored per file,
> and none for directories.  For details, see section 5.2.1 (File system
> objects) in the Eelco Dolstra's thesis "The Purely Functional Software
> Deployment Model".
>
I see, so this is merely a stylish issue. It will not affected how the
files are stored in the store.

>       Mark

Attachment: signature.asc
Description: PGP signature

Reply via email to