Results 1 to 3 of 3

Thread: file ownership

  1. #1
    Join Date
    Mar 2006
    Beans
    369

    file ownership

    at the moment I have a file with this ownership
    www-data www-data

    it needs to be
    www-data root

    what is the command to change this?

    lwx11
    Ubuntu on virtual machine on host Lion 10.7.4
    hacktosh i7 3.4 cpu 8gigs ram asus maximus IV gene-z mb

  2. #2
    Join Date
    Nov 2005
    Location
    Carmel, Indiana U.S.A.
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: file ownership

    Code:
    $ man chown
    New Build : Core 2 Quad, 8G RAM, 1.75TB Storage ... it's fun!
    GRUB Partition Linux Backups- Ver2 Easy LAMP Install
    Linux ID 422356 Ubuntu User 15015

  3. #3
    Join Date
    Jan 2008
    Beans
    4,757

    Re: file ownership

    Two commands you could use are chown or chgrp

    chown lets you able to change both owner and group permissions
    Code:
    sudo chown www-data:root filename.txt
    chgrp just allows you to change the group.
    Code:
    sudo chgrp root filename.txt
    Since you are changing the group to a user that is not yourself, you are required to use sudo in order to acquire the right privileges to change the group permission of the file.

    Regards
    Iain

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •