Root unable to change ownership and modify permissions

Joe(theWordy)Philbrook jtwdyp at ttlc.net
Wed Apr 21 18:32:52 UTC 2010


It would appear that on Apr 21, I Am Me did say:

> * from : William Hamra <w.hamra1987 at gmail.com> sent on Tuesday 20 Apr 2010 @ 1:11:06 pm
> >
> > he would have to mount it, while in "iamme":
> > 
> > sudo mount /dev/sdb5 /media/Andrew -t ntfs-3g -o rw,uid=`id -u`,gid=`id -g`
> > 
> Here is my attempt to try your suggestion ?
> 
> iamme at thishost\~ >sudo mount /dev/sdb5 /media/Andrew -t ntfs-3g -o rw,uid=`1001`,gid=`1001`
> 1001: command not found
> 1001: command not found

Hello, I don't know anything about mounting ntfs partitions, But I can
tell you what went wrong with your command...

In William's example he embedded "id -u" and "id -g" commands on a
command line that assumed the entire "sudo <command> would be
executed from the intended "iamme" login so that the two embedded
commands (id -u, id -g) would substitute the actual uid & gid numbers
into the command. This would happen because he wrapped the "id"
commands not in normal quotes but in 'grave accent' character's which
the shell executes whatever is inside them  like they were separate
commands, and then substitutes the results into the command line
itself as it's executed. I presume he did that because he had no way
to know that the actual uid & gid were "1001".

When you manually inserted the actual uid and gid (both being "1001")
you left the graves accent characters in place. causing the shell
to attempt to execute the values as commands, which resulted in error
messages because the shell couldn't find a command named "1001" 
Assuming the rest of the command is correct, instead of:

sudo mount /dev/sdb5 /media/Andrew -t ntfs-3g -o rw,uid=`1001`,gid=`1001`

Try it without the graves accent characters:

sudo mount /dev/sdb5 /media/Andrew -t ntfs-3g -o rw,uid=1001,gid=1001

I can't say it will serve the purpose, but it will eliminate the 

1001: command not found

errors...
Good luck

-- 
|   ---   ___
|   <0>   <->     Joe (theWordy) Philbrook
|       ^              J(tWdy)P
|    ~\___/~      <<jtwdyp at ttlc.net>>





More information about the kubuntu-users mailing list