[SOLVED] Is there any file in the home folder needed to be executable?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
InChrist
Level 4
Level 4
Posts: 296
Joined: Wed Apr 12, 2017 4:17 pm
Location: Heaven to earth
Contact:

[SOLVED] Is there any file in the home folder needed to be executable?

Post by InChrist »

chmod -R a-x+X /path/to/folder
Is this secure to do also with the whole home folder including .cache, .config ... or does any of the files in there need to be executable?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Visit my profile link for NOW AND ETERNITY.
Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Cinnamon 4.6.6 wm: muffin dm: LightDM
Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal
inxi -Szxx from 2020 03 25
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: Is there any file in the home folder needed to be executable?

Post by altair4 »

No matter how many times you ask the same question you are likely to get the same answer.

You should not be changing any ownership or permissions on your home folder recursively.

Are you going to post this question in Networking next?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Pjotr
Level 24
Level 24
Posts: 20091
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Is there any file in the home folder needed to be executable?

Post by Pjotr »

Somehow this topic (and its sister-topic) gives me the giggles. :lol:
Image
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
gm10

Re: Is there any file in the home folder needed to be executable?

Post by gm10 »

Pjotr wrote: Mon Jul 09, 2018 12:23 pm Somehow this topic (and its sister-topic) gives me the giggles. :lol:
Image
/thread

lmfao :lol:

(this is his 3rd thread btw, so more like sibling topics, haha)
User avatar
InChrist
Level 4
Level 4
Posts: 296
Joined: Wed Apr 12, 2017 4:17 pm
Location: Heaven to earth
Contact:

Re: Is there any file in the home folder needed to be executable?

Post by InChrist »

OK, I need to get back to work, I feel that some answers are missing on some questions I asked. Instead you are laughing. :-(

And a new one:
Would it be secure to use inside Documents, Pictures ...?
Visit my profile link for NOW AND ETERNITY.
Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Cinnamon 4.6.6 wm: muffin dm: LightDM
Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal
inxi -Szxx from 2020 03 25
gm10

Re: Is there any file in the home folder needed to be executable?

Post by gm10 »

InChrist wrote: Mon Jul 09, 2018 5:35 pm OK, I need to get back to work, I feel that some answers are missing on some questions I asked. Instead you are laughing. :-(

And a new one:
Would it be secure to use inside Documents, Pictures ...?
Just don't use it. Full stop. I can not think of any good reason to ever mass-strip executable attributes.
User avatar
Pjotr
Level 24
Level 24
Posts: 20091
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Is there any file in the home folder needed to be executable?

Post by Pjotr »

Indeed. Why intentionally make a mess of things? Why on earth are you so intent on breaking stuff? :shock:
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
User avatar
BenTrabetere
Level 7
Level 7
Posts: 1890
Joined: Sat Jul 19, 2014 12:04 am
Location: Hattiesburg, MS USA

Re: Is there any file in the home folder needed to be executable?

Post by BenTrabetere »

Pjotr wrote: Mon Jul 09, 2018 5:44 pmWhy intentionally make a mess of things?
Are you familiar with Cunningham's Law? The best way to get the right answer on the Internet is not to ask a question, it’s to post the wrong answer.
Patreon sponsor since August 2022
Image
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: Is there any file in the home folder needed to be executable?

Post by Hoser Rob »

InChrist wrote: Mon Jul 09, 2018 5:35 pm OK, I need to get back to work, I feel that some answers are missing on some questions I asked. Instead you are laughing. :-(

And a new one:
Would it be secure to use inside Documents, Pictures ...?
You got a perfectly straghtforward answer, don't do this in /home, ever. Note that Documents and Pictures are in /home. Are you waiting for someone to say it's OK? Because they'll be an idiot.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Is there any file in the home folder needed to be executable?

Post by jimallyn »

InChrist wrote: Mon Jul 09, 2018 5:35 pmWould it be secure to use inside Documents, Pictures ...?
Um, ordinarily, one does not run a document or a picture as a program. Don't do it.
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Is there any file in the home folder needed to be executable?

Post by Flemur »

InChrist wrote: Mon Jul 09, 2018 11:37 am chmod -R a-x+X /path/to/folder
Is this secure to do also with the whole home folder including .cache, .config ...
Probably, because your command doesn't seem to do anything when I run it:

Code: Select all

$ ls -al | grep temp
drwxr-xr-x  2 username username    4096 Jul  9 14:52 temp
$ chmod -R a-x+X temp
$ ls -al | grep temp
drwxr-xr-x  2 username username    4096 Jul  9 14:52 temp
$
or does any of the files in there need to be executable?
Maybe. But probably not.

What's with the "X"? I've never used it:
"execute/search only if the file is a directory or already has execute permission for some user (X),"
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
InChrist
Level 4
Level 4
Posts: 296
Joined: Wed Apr 12, 2017 4:17 pm
Location: Heaven to earth
Contact:

Re: Is there any file in the home folder needed to be executable?

Post by InChrist »

altair4 wrote: Mon Sep 25, 2017 7:17 am There is probably a very sophisticated way of determining which file should have the execute bit and which one should not but I am not a sophisticated person.

So if I found myself in a situation where I mistakenly did a recursive octal chmod and everything ended up executable I would probably resort to this:

Code: Select all

chmod -R a-x+X /path/to/folder
The "-x" would remove the execute bit on everything including folders. The "+X" will add it back for folders only.
But the command I used did not work I guess - that was my luck, thanks to God. I could find now changes when checking permission differences betweeen source and target.

I will not use it anymore. And follow Altairs advice "You should not be changing any ownership or permissions on your home folder recursively."


Thanks for the competent and clear answers.
Visit my profile link for NOW AND ETERNITY.
Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Cinnamon 4.6.6 wm: muffin dm: LightDM
Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal
inxi -Szxx from 2020 03 25
Locked

Return to “Other topics”