Ubuntu-14.04 [SOLVED]: Update, copy file from php script ubuntu

Ubuntu-14.04 [SOLVED]: Update, copy file from php script ubuntu

Home Forums Ubuntu 14.04 Ubuntu-14.04 [SOLVED]: Update, copy file from php script ubuntu

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36620

    Anonymous

    QuestionQuestion

    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?

    #36621

    Anonymous

    Accepted AnswerAnswer

    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

    Source: https://stackoverflow.com/questions/47828339/update-copy-file-from-php-script-ubuntu
    Author: M.Bwe
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.