How best to change the 'ownership' of a whole drive or directory via 1 or a few commands?

Nils Kassube kassube at gmx.net
Sat May 21 09:04:33 UTC 2016


Bas Roufs wrote:
> But another problem popped up. The 'ownership' of my external HD's
> have changed from #normal-user-name to #root.
> 
> Normally, I do manage to change the ownership of a whole external
> drive via kdesudo dolphin > properties. However,  this does not work
> now. Is there any commandline option to change back the ownership
> everything at /dev/sdb/ from #root to, in my case, #bas?

Provided you are talking about ext2/3/4 partitions, you can mount the 
individual partitions of sdb to e.g. /mnt and then use the command

sudo chown -R $USER: /mnt

in a terminal (konsole) - replace /mnt accordingly if you use a 
different location.


Nils





More information about the kubuntu-users mailing list