S
S
sergiofollan2016-05-31 15:58:21
linux
sergiofollan, 2016-05-31 15:58:21

I can not change the user and group of the file through php with the chown () and exec("chown ..." command), the error is not allowed, how to fix it?

Hello. The essence of the problem is that when using chown(), a Not Permited error occurs. Through the exec("chown...") or system("chown ...") command, it produces nothing at all, but when checking, the result is returned false. How to solve this problem, I've been soaring over it for 3 days already?
Server virtual machine on Ubuntu.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Nikolaev, 2016-05-31
@nightvich

Do you have enough privileges to execute chown?

Y
Yuri Chudnovsky, 2016-05-31
@Frankenstine

The root user has the privilege to change ownership. You need to run chown on its behalf through the su or sudo mechanism.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question