P
P
pqgg7nwkd42016-06-29 22:54:39
linux
pqgg7nwkd4, 2016-06-29 22:54:39

Ubuntu: Why doesn't chown work?

Good afternoon.
There is a user jp.
There is a folder: /home/jp/app/webapps/ROOT with permissions:

[email protected]:~/app/webapps$ ls -l / | grep home
drwxr-xr-x   3 root root  4096 июн 28 21:46 home
[email protected]:~/app/webapps$ ls -l /home/ | grep jp
drwxr-xr-x 8 jp jp 4096 июн 29 22:23 jp
[email protected]:~/app/webapps$ ls -l /home/jp/ | grep app
drwxrwxr-x 7 jp jp 4096 июн 29 21:47 app
[email protected]:~/app/webapps$ ls -l /home/jp/app | grep webapps
drwxrwxr-x 3 jp jp 4096 июн 29 22:47 webapps
[email protected]:~/app/webapps$ ls -l /home/jp/app/webapps | grep ROOT
drwxrwx--- 17 jp jp 4096 июн 29 22:47 ROOT
[email protected]:~/app/webapps$ ls -l /home/jp/app/webapps/ROOT | grep htm
-rw-rw---- 1 jp jp  2185 июн 23 15:04 account.cmp.html
-rw-rw---- 1 jp jp  9332 июн 23 15:04 bg.html
-rw-rw---- 1 jp jp   925 июн 23 15:04 enctest.html
-rw-rw---- 1 jp jp  2696 июн 23 15:55 index.html
-rw-rw---- 1 jp jp  2489 июн 23 15:04 ws.html
-rw-rw---- 1 jp jp 20724 июн 23 15:04 xp2.html
-rw-rw---- 1 jp jp  3476 июн 23 15:04 xp.html

I execute on behalf of jp:
chown jp:www-data -R /home/jp/app/webapps/ROOT
I get for all files:
chown: изменение владельца '/home/jp/app/webapps/ROOT/xp.html': Операция не позволена
chown: изменение владельца '/home/jp/app/webapps/ROOT/bg.html': Операция не позволена
...

Why and how to set the owner? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2016-06-29
@pqgg7nwkd4

user jp must be a member of the www-data group in order to transfer rights to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question