38
5
I'm logged in as minime.
I don't understand why it doesn't allow me to chown file that I own without su privileges. Obviously I can use sudo, but I'd like to understand why? because of www-data group?
chown minime:www-data user-functions.php
ls -lh
-rw-r--r-- 1 minime minime 24K Jan 6 16:11 user-functions.php
Error:
chown: changing ownership of `user-functions.php': Operation not permitted
Also: http://pubs.opengroup.org/onlinepubs/009695399/functions/chown.html
– slhck – 2014-01-06T12:51:23.570Thanks @slhck I checked the
man
page and could not find an explicit mention of this, answer updated. – terdon – 2014-01-06T12:58:12.273great! much clear now... what if minime is part of www-data group? – None – 2014-01-06T14:15:36.190
@SandroDzneladze nope, you need to have the same user ID as the user you want to chown to. – terdon – 2014-01-06T14:20:52.373