Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Not sure if this is an rsync issue or a weird Redhat security issue. I have 2 groups. GroupA and GroupB. I have a file structure like this... /GroupADir and /GroupADir/GroupBDir... /GroupADir is owned by groupa:groupa. The /GroupADir/GroupBDir is owned by groupb:groupb. GroupA is a member of GroupB. When I run rsync I am using the groupa account as my ssh account when i do this. When running rsync, GroupA gets all of the files with no problems from both directories. However, after finishing rsync, the /GroupADir/GroupBDir is now mysteriously and recursively owned by groupa:groupa instead of the original groupb:groupb. Is there any way to keep this from happening after rsync is run?
rsync does have flags that deal with ownership and permissions.
However the most obvious possibility would be that you have different UIDs for groupa/groupb on the two boxes. The files are actually stored with the UID (User Identity = Numeric) as opposed to the User name (Alpha). When you use commands such as ls to list files it does a lookup in /etc/passwd to convert the UID to the name.
So if on hosta you had groupa with UID 500 but on hostb you groupa with UID 501 and groupb with UID 500 then the files that ls would find as NAME groupa on hosta would be NAME groupb on hostb but would be UID 500 on both.
You can determine UID by doing a grep for the user name from /etc/passwd:
e.g.:
grep jlightne /etc/passwd
jlightne:x:515:500:Jeff Lightner:/home/jlightne:/bin/ksh
The 3rd field is the UID which is 515 for the example. (The fourth field is the GID [Group ID]).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.