[SOLVED] Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

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 Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by InChrist »

Hi :-)

I launched

Code: Select all

Chmod -R a-x+rwX,go-w /home/myhomefolder
and now I am waiting for 20 minutes.
I have about 135,000 objects and 500 hidden in my home folder.
When I switch back to the terminal, the cursor blinks 5 times until it stays dark. I cannot enter or change anything in the terminal.

Why?
Is the command allright?
Is ist still running?
What to do?
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
gm10

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by gm10 »

considering you're stripping execute permissions from all files you'll probably break a lot of things, so good luck with whatever you're trying to achieve. hope you got a backup. ;)
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by Flemur »

InChrist wrote: Mon Jul 09, 2018 9:39 am

Code: Select all

Chmod -R a-x+rwX,go-w /home/myhomefolder
Is the command allright?
No. There is no "Chmod" command.
Is ist still running?
What to do?

Code: Select all

ps -ef | grep chmod
to see if it's (chmod, not Chmod) still running.
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 Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by InChrist »

Oh! Thank you ...

gm10 wrote: Mon Jul 09, 2018 9:46 am considering you're stripping execute permissions from all files you'll probably break a lot of things, so good luck with whatever you're trying to achieve. hope you got a backup. ;)
Really - what do you mean, this is my home folder only ... ?

Flemur wrote: Mon Jul 09, 2018 10:03 am

Code: Select all

ps -ef | grep chmod
kl        4407  4385  0 16:32 pts/1    00:00:00 grep --color=auto chmod

Code: Select all

ps -ef | grep Chmod
kl        5552  5275  0 16:47 pts/1    00:00:00 grep --color=auto Chmod
What does this mean? Is it still running and doing its job? Shall I wait ...?
Last edited by InChrist on Mon Jul 09, 2018 10:49 am, edited 2 times in total.
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
WharfRat

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by WharfRat »

Executable mode has to be set on a folder in order to be able to access it.

There is no Chmod command - it would be chmod.

Linux is case sensitive.

You shouldn't chmod files/folders without understanding the consequences.
User avatar
InChrist
Level 4
Level 4
Posts: 296
Joined: Wed Apr 12, 2017 4:17 pm
Location: Heaven to earth
Contact:

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by InChrist »

Oh, I have recherched quite a lot before it. But I am not an expert at all. Does not the "+X" will add it back for folders?
Last edited by InChrist on Mon Jul 09, 2018 11:01 am, edited 1 time in total.
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 Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by gm10 »

InChrist wrote: Mon Jul 09, 2018 10:38 am Really - what do you mean, this is my home folder only ... ?
Yes, and now some items in your menu won't be executable, neither will applets you installed, launchers on the panel or the desktop, Steam and flatpak applications, etc.
InChrist wrote: Mon Jul 09, 2018 10:52 am Oh, I have recherched quite a lot before it. But I am not an expert at all. Does not the "+X" will add it back for folders?
Your command should not have removed it from folders.
User avatar
InChrist
Level 4
Level 4
Posts: 296
Joined: Wed Apr 12, 2017 4:17 pm
Location: Heaven to earth
Contact:

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by InChrist »

I have read somewhere that chmod does not affect hidden files ... are there other files in the home folder which must be executable?
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
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by Flemur »

InChrist wrote: Mon Jul 09, 2018 11:37 amI have read somewhere that chmod does not affect hidden files
chmod affects hidden files.
... are there other files in the home folder which must be executable?
Executable scripts.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by Flemur »

WharfRat wrote: Mon Jul 09, 2018 10:45 amExecutable mode has to be set on a folder in order to be able to access it.
His command:

Code: Select all

chmod -R a-x+rwX,go-w <file>
apparently doesn't actually set "-x" :

Code: Select all

$ mkdir temp
$ touch temp/a
$ ls -al temp 
drwxrwxr-x  .
drwxrwxr-x  ..
-rw-rw-r--  a
$ chmod -R a-x+rwX,go-w temp
$ ls -al temp
drwxr-xr-x  .
drwxrwxr-x  ..
-rw-r--r--  a
$ 
(looks like it just removes write permission for non-owner)
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
gm10

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by gm10 »

Flemur wrote: Mon Jul 09, 2018 1:40 pm His command:

Code: Select all

chmod -R a-x+rwX,go-w <file>
apparently doesn't actually set "-x" :

Code: Select all

$ mkdir temp
$ touch temp/a
$ ls -al temp 
drwxrwxr-x  .
drwxrwxr-x  ..
-rw-rw-r--  a
$ chmod -R a-x+rwX,go-w temp
$ ls -al temp
drwxr-xr-x  .
drwxrwxr-x  ..
-rw-r--r--  a
$ 
(looks like it just removes write permission for non-owner)
Testing -x on a non-executable file. Your methodology is convincing, I wish to subscribe to your newsletter! :twisted:
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by altair4 »

I don't see how anyone could answer your question since we don't know what is in your home folder. You could have a 3TB partition from a secondary hard drive mounted to your home directory which might explain why it'
s taking 2 days to change permissions./
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by Flemur »

altair4 wrote: Mon Jul 09, 2018 1:45 pm I don't see how anyone could answer your question since we don't know what is in your home folder. You could have a 3TB partition from a secondary hard drive mounted to your home directory which might explain why it'
s taking 2 days to change permissions./
If he has ~/.wine he might be having this sort of fun:
pwd = /home

Code: Select all

$ grep -iRl fred username
...
grep: warning: username/.wine/dosdevices/c:/users/username/Desktop: recursive directory loop
grep: warning: username/.wine/dosdevices/c:/users/username/My Documents: recursive directory loop

...(and then via the wine links it gets into my DATA partition, which has thousands of files)...

username/.wine/dosdevices/d:/bob/Pix/THAT/bd_THAT_scamp2.jpg
username/.wine/dosdevices/d:/bob/Noizes/BIOKM/bd_BIOKM_084.mp3
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 Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by InChrist »

Inside documents only files like pdf, odt, jpg - no hidden files.
So why would there be any problem with a recursive command inside documents, or 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
User avatar
InChrist
Level 4
Level 4
Posts: 296
Joined: Wed Apr 12, 2017 4:17 pm
Location: Heaven to earth
Contact:

Re: Is Chmod -R a-x+rwX,go-w /home/myhomefolder OK? Still running?

Post by InChrist »

It looks like the command did not to do anything - which in fact was my luck as I have learned it is not good to do what I intended. Thanks to God.
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”