Are User home directories owner and group supposed to be owned by root?

I have noticed new users that I create their home directory is owned by root and group owned by root my old users are owned by their username. Is this a bug, he reason im asking is ny shell history does not save for the new user I created. Im running the latest Hestia 1.5.4 and Ubuntu 20.04

Check discussion here:

also

PS: It’s a good idea to search Github issues for HestiaCP technical choices.

2 Likes

When SFTP jail is active: Owner is root

When inactive owner is user

If not sftp jails is not working properly and users can view the /home/ folder

We need rush to stop worrying about this.
I know it is a lot of work. If you could break the tasks down we could then estimate the time and ask for a sponsor.

Thank you everyone for your explanation. Just to confirm: with SFTP jail active it will not be able to log bash shell command history as it doesn’t have permission to create or write to the file .bash_history file in the users home directory.

sftp jail should not be active when shell access is enabled

@eris I see, although I switched the shell for my new user from no login to bash and it did not change the owner permission from root to user owner. From what your saying that is not intended and it should have changed the owner when I switched to bash

v-delete-user-sftp-jail username should do it…

1 Like

@eris I ran v-delete-user-sftp-jail username but it did not switch the owner of their home dir to their respecting user, it still shows root. Do you have to manually set the owner and group after runningv-delete-user-sftp-jail by using chown username:username /home/username and if so is it safe to do so?

What happens when you run v-rebuild-user username?

1 Like

That did the trick!! Thanks @eris

For the future is it possible when you switch the shell from nologin to a shell for a user to have Hestia run v-delete-user-sftp-jail username and v-rebuild-user username and vice versa if set back to nologin

apt install rush isn’t the issue. The major issue finding the correct config to use. Mainly with the lack information

I have read the rush documentation and it is complicated. Maybe we could try to reach out the developer.

I even think rush issn’t suitable as you still don’t have access to terminal and 99% of the users want to run certain commands… (unzip, wget, mysqldump and many more

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.