[ubuntu-uk] External drive is stuck at read-only.

Neil Greenwood neil.greenwood.lug at gmail.com
Wed Jan 30 08:33:23 GMT 2008


On 29/01/2008, Sean Miller <sean at seanmiller.net> wrote:
>
>
> > Obviously, change <user> to your username, and <mountpoint> to the
> > directory at which the drive is automounted. E.g. my command was
> > actually "sudo chown neil:\ /media/FREECOM".
>
> What's the :\ all about after the username?  I've not seen that syntax
> before...
>

Hi Sean,

I got the syntax wrong - it should be "chown neil\: <files>" - d'oh!
So it's just quoting the colon from the shell.

Paraphrased from the chown man page:
If only a user is given, that user is made owner of the file(s), and
the group remains unchanged.
If a user is followed by a colon and a group (with no spaces between
them), the group ownership of the file(s) is changed as well.
If a user is followed by a colon but no group, the group ownership is
changed to that user's login group.
If a colon and group is given, only the group ownership of the file(s)
is changed.

Almost makes you wonder why the chgrp command exists... :-)

Hwyl,
Neil.



More information about the ubuntu-uk mailing list