Issue
I have freeradius management system which is developed by php language I want to copy file1 inside freeradius folder to the file2 inside same folder but I can not do that even if I set permission to www-data I used this code to copy file
exec('cp /etc/freeradius/modules/file1 /etc/freeradius/modules/file2');
the result of ls -l /etc/freeradius/modules/file1
is
-rwxrwx--- 1 www-data freerad 0 Dec 15 10:28 /etc/freeradius/modules/file1
where is my wrong and how can I do that?
Solution
yes the wrong is that I don't have permission to access freeradius folder from www-data user so when I set freeradius owner by www-data the problem was solved
Answered By - M.Bwe Answer Checked By - Senaida (WPSolving Volunteer)