Problems unpacking files in RAR on Linux UBUNTU

Good afternoon!

I have a server that runs on a LINUX Ubuntu SERVER Cloud web server, 7 years ago I migrated to another local server also with LINUX UBUNTU SERVER.

On cloud linux APACHE with PHP and MySQL ran in / var / www, the files created by the upload routines, were owned by the user WWW-DATA. SHELL_EXEC, a command that I use in PHP to execute S. O. command lines and to unzip files through the unrar function, it worked perfectly.

However, in this new server, the root user in thesis " does not exist "the default user is" user@life " that was the user informed in the installation of the server, whenever I need something as an administrator I run the SUDO command previously, and put the password of this user in thesis is the ROOT. But there is no way to give SUDO and pass a password through SHELL_EXEC, at least I do not know how to do it.

The problem is that the uploads made are in property of a user called DAEMON, the files are inside / opt / lampp / htdocs / we can change to always UPLOAD as WWW-DATA, but the property of the Upload file is "user@life" with permission to create folder and write, the folder is created but the file can not be unpacked inside it, we run the command on the command line and it works normally.

Do you have any idea what it might be? The DAEMON user is already in the administrators group, the www-data also, as well as the root I created and the user@life, still does not work.

Author: Maicon Herverton, 2018-06-14