Good afternoon!
I have a server that runs on a Cloud Web Server LINUX UBUNTU SERVER, 7 years ago, I migrated to another local server also with LINUX UBUNTU SERVER.
In Cloud Linux, APACHE with PHP and MySQL ran in / var / www, files created by UPLOAD routines, were owned by the WWW-DATA user. The SHELL_EXEC command, which I use in PHP to run S.O. command lines and to unzip files through the UNRAR function, worked perfectly.
However, on this new server, the ROOT user in thesis "Does not exist" the default user is "user @ life" that was the user informed in the server installation, whenever I need something as administrator I execute the SUDO command previously, and I put the password of this user that in thesis is the ROOT. But you can not give SUDO and pass a password through SHELL_EXEC, at least I do not know how to do it.
The problem is that UPLOAD made is owned by a user named DAEMON, the files are inside / opt / lampp / htdocs / we can change forever to make UPLOAD as WWW-DATA, however the ownership of the upload file is of "user @ life" with permission to create folder and write, the folder is created but the file can not be unpacked inside it, we already run the command in the command line and it works normally.
Do you have any idea what it might be? The DAEMON user is already in the admin group, the www-data, as well as the root I created and the user @ life, does not work anyway.