usermod : no changes

Issues related to applications and software problems and general support
Post Reply
Cezar Apulchro
Posts: 8
Joined: 2022/07/29 11:24:15

usermod : no changes

Post by Cezar Apulchro » 2022/08/09 14:48:06

Hi, I saw this link https://www.tecmint.com/usermod-command-examples/ the following command usermod -d /var/www/ tecmint but when I use this command to my user I'm receiving usermod: no changes the result of the ls -l command is:
[root@vps40026 www]# ls -l /var/www
total 158988
drwxr-xr-x. 4 adminitc root 29 Aug 7 08:41 36532444715.itcmedbr.com
drwxr-xr-x. 2 adminitc root 6 Apr 6 11:56 cgi-bin
drwxr-xr-x. 4 adminitc root 29 Aug 5 17:15 clinica.itcmedbr.com
drwxr-xr-x. 3 root root 18 Aug 9 08:55 demonstracao.itcmedbr.com
drwxr-xr-x. 3 adminitc root 50 Apr 6 11:56 html
-rwxr-xr-x. 1 root root 162802212 Jun 30 14:03 jdk-17_linux-x64_bin.rpm
[root@vps40026 www]#
I want that adminitc access all of /var/www to directory to use filezila but I can't to do this.

I apreciate any help.
Thanks and best regards.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: usermod : no changes

Post by jlehtone » 2022/08/09 14:57:28

man usermod says that -d is short for --home.
You did change the home directory of tecmint to be /var/www.
You can see that with getent passwd tecmint (unless the command really did not update the config).

The command does not move files or touch permissions, I presume. You probably want to restore the original, correct value.
Perhaps usermod --home /home/tecmint

It does look like everyone can read and execute (rx) all of /var/www content.
The adminitc can write too, but that is obviously different account than tecmint.

Cezar Apulchro
Posts: 8
Joined: 2022/07/29 11:24:15

Re: usermod : no changes

Post by Cezar Apulchro » 2022/08/09 19:52:01

Really I want that adminitc to control all content of /var/www. How I do that?

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: usermod : no changes

Post by tunk » 2022/08/09 21:02:32

Take a look at these commands, maybe in particular with the "-R" option:
chmod chgrp chown
Note that changing owner/group/access may have unintended results.

Post Reply