LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-05-2016, 06:45 AM   #1
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 245

Rep: Reputation: Disabled
owner/group 797/796 (after rsyncing to a new hosting)


I used to have three websites on a shared hosting plan and I've rsynced them to a new hosting plan (self-managed, ovh, Centos7). When I look at the owner/group of these files they are 797 and 796, it looks something like this in Filezilla:

http://prntscr.com/c1wvzd

When I look at some other websites (they were transferred from a different hosting plan, I think this is the reason), the owner/group are set to root/root (which seems to be good and needed state of this). I've never created any additional groups or users on this hosting plan, so any of these 797 or 796 did not exist previously there.

Is this something that is not good and need to be change and can it cause some kind of problems with how the websites work? I was trying to find some info about it on the Net but it looks like there is nothing there on that.

So what this is, why 797 and 796, should I change it and so on? Any info about it basically would be good, as I am not sure what this is. The files were rsynced in the archive mode from a managed shared hosting plan.

Thanks.
 
Old 08-05-2016, 06:59 AM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,380

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
It's the UID/GID from the previous system.
You used rsync options to preserve them.

Just change them to what you want.
 
1 members found this post helpful.
Old 08-05-2016, 07:05 AM   #3
hazel
Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: Debian, Crux, LFS, Dragora, NuTyX
Posts: 516

Rep: Reputation: 229Reputation: 229Reputation: 229
It's never a good idea to have files owned by a UID that has no user name attached. Someone could create a user on your system with that UID and then the files would belong to him. You should definitely chown them, but not necessarily to root.

I seem to remember that public web pages are usually owned by a special unprivileged user.
 
Old 08-05-2016, 07:16 AM   #4
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 245

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by descendant_command View Post
It's the UID/GID from the previous system.
You used rsync options to preserve them.

Just change them to what you want.
It used to be my username, lets say "johnsmith" on the previous hosting (a text string, something like this). It has now became 797 and 796, so how would this work? Is this some kind of default for Linux or Centos? Unknown and not existing username and group -> assign to 797 and 796? Like I said, did not see anything about it on the Internet. Searching for "owner 797 group 796 linux" in google.com returns an index of a Linux book and the 797 and 796 are the pages of the book, but no info about what this could be here.
 
Old 08-05-2016, 07:24 AM   #5
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 245

Original Poster
Rep: Reputation: Disabled
I dont have another user on the system, so I guess I will change it to root/root (unless this is not what I should do, but from what I imagine this is an acceptable thing). From /etc/httpd/conf/httpd.conf:

User apache
Group apache

So this is the user and group which Apache uses and accesses the files and folders of the websites through the >>>Other<<< Permissions (user-group-other). So is root/root ok, or would I create a "user_one" and assign it it that? I dont see a reason though, as I run everything under root. This may not be THE BEST config, but it is for slow websites, nothing very popular or exposed there... I will set up key based auth on a custom ssh port and disable password login, but I will leave the root login, as this is how I work now (I know that I should disable root login, add a user then su to the root, but I dont do it this way here). So root/root, I guess and it should be good...
 
Old 08-05-2016, 07:27 AM   #6
wpeckham
Senior Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 1,650

Rep: Reputation: 568Reputation: 568Reputation: 568Reputation: 568Reputation: 568Reputation: 568
Quote:
Originally Posted by AdultFoundry View Post
It used to be my username, lets say "johnsmith" on the previous hosting (a text string, something like this). It has now became 797 and 796, so how would this work? Is this some kind of default for Linux or Centos? Unknown and not existing username and group -> assign to 797 and 796? Like I said, did not see anything about it on the Internet. Searching for "owner 797 group 796 linux" in google.com returns an index of a Linux book and the 797 and 796 are the pages of the book, but no info about what this could be here.
descendant_command told you exactly what was going on here. Rsync does not change the owner and group on the files by default (there is a parameter to change that behavior) but it passes the data intact. The data is stored as numbers. If you use ls with the proper options, it will list out your files locally showing the numeric user and group numbers instead of names. You transferred the files with those ownerships, and they arrived with those ownerships, but on the receiving system there are no user or group names tied to those numbers so it cannot interpret them for display so it just displays the number.

Either change the ownership after transfer, before transfer, transfer using the option that remaps the ownership, add the group and user on the remote system WITH those UID and GID numbers, or live with it. Your choice. Just so you know, it is due to your activity and expected behavior: there is no bug implicated in any part of this.

Given all of this, how do you want to address these so that everything works and looks the way you want? If you try something, come back and leave a comment so we know what worked best for you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
change of owner and group owner of a file belongs to diff user ? somorg Linux - Newbie 3 06-14-2015 10:11 AM
change of owner and group owner of a file belongs to diff user ? somorg Linux - Security 2 06-13-2015 03:33 AM
change of owner and group owner of a file belongs to diff user ? somorg Linux - General 2 06-12-2015 11:40 AM


All times are GMT -5. The time now is 08:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration