Owner and Group not Displaying after Chroot

Latest response

Hello everyone,

So I am a little stuck with a problem I am having. It is not exactly linux related but I cannot seem to figure it out or find solution on the internet.

So what I have done is I have chrooted a group to a particular directory on my server and that works absolutely fine, this is not the problem.

My problem is that I have my user ssh to the server via WinSCP and it drops them in the correct folder. However the problem is that the Owner and Group do not show up correctly. The show up as the PID in the passwd/group file.

I tried copying the /etc/passwd & /etc/group to the chrooted folder but this did not help. I deleted the other users and groups that don't have rights to this chrooted folder so as to not have a security concern.

So I am wondering what do I have to do to have the user/group show up on the permissions in WinSCP. Is it a winscp issue or what step have I forgot to do.

The attached image may make it clearer.

Again thank you for the help within the community as always.

Regards,
Patrick

Responses

Hello Patrick,

Where did you put the copies op passwd and group? In chrooted folder or chrooted folder/etc? They should be in chrooted folder/etc and a copy of ls should be in "chrooted folder"/bin

Regards,

Jan Gerrit Kootstra

Hello Jan, I copied them to the chrooted folder, in this case /var/www/html/nycdata/nycdata. So you are saying make a folder called /var/www/html/nycdata/nycdata/etc and then copy over passwd and group to them?

I am not sure what you mean by 'copy of ls' - do I have to make a /var/www/html/nycdata/nycdata/bin as well and drop group and passwd files in there?

Thank you so much for the help. Patrick

Hi Patrick,

So you are saying make a folder called /var/www/html/nycdata/nycdata/etc and then copy over passwd and group to them?

correct

I am not sure what you mean by 'copy of ls' - do I have to make a /var/www/html/nycdata/nycdata/bin as well and drop group and passwd files in there?

You have to make the folder /var/www/html/nycdata/nycdata/bin and perform the command as root:

cp /bin/ls /var/www/html/nycdata/nycdata/bin

Regards,

Jan Gerrit

Thank you Jan - I will try that later and let you know how it goes.

Hello Jan,

So I dropped the /etc/passwd and /etc/group in to the /var/www/html/nycdata/nycdata/etc folder and the /bin/ls into /var/www/html/nycdata/nycdata/bin folder. Then when log in via WinSCP it still does not show user/group ownership. Am I missing something.

Thank you.

Hello Jan,

I have come back around to looking at this again as I got busy with other tasks. Have you any other ideas where I may be going wrong? I tried what you suggested and it doesn't seem to be working for me.

Thank you.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.