Search code examples
group-policyownership

How do I change the owner/group of a file in my server?


I am getting a 500 error because the owner of some of my files is set incorrectly, its set at 0 0 when the rest are at 510 510?? How do I fix this, I've read something about ssh?


Solution

  • Yes, SSH is right. You need to use SSH to connect to your server (using openssh and the "ssh" program in Linux, or PuTTy in Windows) and issue the command webdestroya already posted:

    $ ssh yourserver -l username <host>
    OR
    $ ssh yourserver [username@]<host>
    

    And then issue the command to change your file permissions:

    $ chown 510:510 thefile.file