LinuxQuestions.org
Visit Jeremy's Blog.
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 01-12-2015, 02:21 AM   #1
BWestOz
LQ Newbie
 
Registered: Dec 2013
Location: Perth WA
Posts: 18

Rep: Reputation: Disabled
File owner number rather than name


Ubuntu 14.10

Some files have owner as number

Why is it that some files or directories have the owner as a number rather than a name?

My ls -la listing for /var/www/html/ | grep moodle gives

drwxr-xr-x 45 1005 1005 4096 Jan 12 13.53 moodle

Who or what is 1005?

There is no such owner in /etc/passwd

How can linux store meaningful permissions information for a user or group that does not seem to exist?

Thank you
 
Old 01-12-2015, 02:53 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,008
Blog Entries: 1

Rep: Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110
Ths most common cause of files with unknown UIDs is because the previous owner account has been deleted.

Files outside the home directory and a few other locations such as the mail spool are not automatically removed when a user account is removed.

Who installed moodle, or who has had access to the html tree?

It is also worth noting that tar will allow you to open an archive and keep the original uid/gid - which may not exist on your system. It is possible that an ill-behaved installer may have created those with a non-existent owner.

Last edited by astrogeek; 01-12-2015 at 03:02 AM.
 
1 members found this post helpful.
Old 01-12-2015, 03:56 AM   #3
BWestOz
LQ Newbie
 
Registered: Dec 2013
Location: Perth WA
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thanks astrogeek,

Going on what you say it doesn't seem to be intentional.

I installed Ubuntu + moodle. Moodle was installed by it's own PHP install script.

I've installed it on a VirtualBox machine on another computer so I had a look at that which has owner www-data, which makes sense to me.

I can only assume that I botched the chown at some stage.

So I've set it back to www-data.

The site still seems to work.

Thanks again
 
Old 01-12-2015, 04:00 AM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,008
Blog Entries: 1

Rep: Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110Reputation: 2110
Great! Glad to help.

Files with nonexistent owners are not a problem of themselves and do occur at times. And as you say, easy enough to simply change ownership and fix.

Good luck!
 
  


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 file owner to another owner byran cheung Linux - Newbie 5 12-19-2014 04:14 PM
Files have owner as uid number rather than username prollocks Red Hat 4 11-18-2009 08:08 PM
Owner of a directory different than file owner problems Guardian-Mage Linux - Server 4 04-24-2009 11:26 AM
Find out the owner of a phone number? jmmbacon Linux - General 1 07-06-2007 03:43 PM


All times are GMT -5. The time now is 12:12 AM.

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