chown: Invalid Argument

I'm trying to change ownership of some files from root to my user.
Most of my files belong to user oliversa and group of the same name:

-rw-r--r-- 1 oliversa oliversa 171B Dec 25 22:21 TODO
drwxr-xr-x 13 oliversa oliversa 442B Dec 31 11:31 code
drwxr-xr-x 5 oliversa oliversa 170B Dec 18 16:46 data
drwxr-xr-x 12 oliversa oliversa 408B Feb 22 17:47 design
drwxr-xr-x 9 oliversa oliversa 306B Dec 21 10:38 httpdocs
drwxr-xr-x 5 oliversa oliversa 170B Feb 27 19:33 script

I want to change these to be the same:
-rwxr-xr-x 1 root wheel 539B Dec 21 11:14 sync
-rw-r--r-- 1 root wheel 86B Dec 21 11:11 sync_files
-r-------- 1 root wheel 9B Dec 18 11:39 sync_pass

So I type:

$ chown oliversa:oliversa *
chown: oliversa: Invalid argument
$ sudo chown oliversa:oliversa *
Password:
chown: oliversa: Invalid argument

This is odd, I think.

Additionally oliversa doesn't exist in /etc/passwd:

$ grep oliversa /etc/passwd
$

MacBook, Mac OS X (10.4.1)

Posted on Feb 27, 2008 8:06 PM

Reply
4 replies

Feb 28, 2008 9:34 AM in response to Ollie Saunders

Are you sure your username and group name are 'oliversa'?

The reason I ask is that 'ls' is probably only showing the first 8 characters of the username and group name - this is the traditional limit in UNIX systems.
However, if your username is really 'oliversaunders', then that is what you need to pass to chown.

Which version of the OS are you on? There are ways of finding the real username and group name, but it varies depending on the OS version.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

chown: Invalid Argument

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.