Change file ownership and access permissions with one command

By | November 6, 2008

You can change the file permissions and ownership, the group and mode of a directory with a single command, using chown. For example, to make a directory called /dir accessible for everyone (RW), set the user joe as the owner of /dir and it’s contents and claim dev as the ownership group, use chown -R a+rw joe:dev dir

One thought on “Change file ownership and access permissions with one command

  1. John

    Two questions:

    1. Which user should own the wordpress files (i.e. in /usr/share/wordpress)? All wordpress files in my setup are owned by “root”.

    2. What should the permissions be? The permissions for most wordpress files in my setup is “644”, with the exception of wp-content/themes/default/style.css and the it’s parent directories, which is “755”.

    What are the owners and permissions on your server?

    My problem is that users (external to my LAN) are not able to read the style.css file.

    Thanks …

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *