guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using ``chmod'' in build phases


From: Alex Vong
Subject: Re: Using ``chmod'' in build phases
Date: Fri, 05 Jan 2018 02:06:53 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Mark H Weaver <address@hidden> writes:

> Alex Vong <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]