You are not logged in.

#1 2017-06-08 08:56:14

loadlover
Member
Registered: 2017-05-10
Posts: 103

[SOLVED]Does a .conf file ever need to be given executable permission?

Hi all,

This question came up during a bunch of test installs. So, does a .conf file ever need to be given executable permission?

Help much appreciated.

Loady

Last edited by loadlover (2017-06-08 12:41:11)

Offline

#2 2017-06-08 09:19:24

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [SOLVED]Does a .conf file ever need to be given executable permission?

Never.  You are simply sourcing it, not executing it.

Offline

#3 2017-06-08 10:07:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: [SOLVED]Does a .conf file ever need to be given executable permission?

This isn't really a very well formed question.  File extensions in linux don't really mean anything, so saying you are talking about a ".conf" file doesn't actually narrow down the question.  If the question is "does a file ever need to be given executable permission?" then the answer is "yes, if you ever want to execute it."

Of course one might think this is being facetious - but really, what's the alternative interpretation of the question?  If the OP is using ".conf" to mean a file that just use for some runtime configuration then the question answers itself: "Does a file that's just used for runtime configuration but never executed need to be executable?" No, of course not, it's just a configuration file.

Loadlover, this feels like an X-Y question.  What are you really getting at?  What events in your test installs led to this question?  I can't help but suspect some configuration file didn't have read permissions so something was failing then by giving it "executable" permission of 0755 everything suddenly works - but 0755 is not just executable, it is also world readable.  But again, this is just a suspicion of what your question *might* actually be coming from.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2017-06-08 12:39:38

loadlover
Member
Registered: 2017-05-10
Posts: 103

Re: [SOLVED]Does a .conf file ever need to be given executable permission?

Thank you both. Appreciated.

Trilby, you were onto it - I think I 'solved' a read problem by going for the chmod 777 nuke option.

Loady

Offline

#5 2017-06-08 13:31:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: [SOLVED]Does a .conf file ever need to be given executable permission?

Please note that while that may have superficially solved a problem in the short term, if you've not reverted that change it could lead to serious problems in the long run.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2017-06-09 06:05:13

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: [SOLVED]Does a .conf file ever need to be given executable permission?

if you're struggling with the mask values, you can always use the alternative og+r style syntax with chmod
and there's also the X flag, which is the safest to use for files you didn't create, vs. x. in general, if you didn't create the files, and you're not sure if they're supposed to be executable, use the X flag

Last edited by HiImTye (2017-06-09 06:08:23)

Offline

Board footer

Powered by FluxBB