File owners

Discussion in 'PHP' started by t3od0r, Oct 21, 2009.

  1. #1
    Hello,

    I have a script that unrar a file to a folder but the files from rars are extracted with different owner and permission and i can't edit them.
    What can i do to have the same owner on the extracted file as on directory where the file is extracted?

    Thanks for all your help.....
     
    t3od0r, Oct 21, 2009 IP
  2. phprightnow

    phprightnow Peon

    Messages:
    296
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Using root or that other user, you can run the command via SSH in the untarred dir:

    chown username:username *

    Replace username with the username you want the new ownership to be.
     
    phprightnow, Oct 21, 2009 IP