Hosted by

Google Ads

Collapse

Announcement

Collapse
No announcement yet.

chmod recursive including chown & remove

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • chmod recursive including chown & remove

    Set permissions on all directories under the folder server1 to 755

    Code:
    chmod -R 755 /usr/home/username/server1/
    Remove all data (file and directories) from the folder server1

    Code:
    rm -rf /usr/home/username/server1/*
    Set the user and group to example:example for all data (files and directories) on/under the directory accounts

    Code:
    chown -R example:example /home/username/public_html/test/accounts
    I hope that helps.
    Forums.Hosting is hosted by HostXNow

  • #2
    Originally posted by FHCL View Post
    Set permissions on all directories under the folder server1 to 755

    Code:
    chmod -R 755 /usr/home/username/server1/
    This will set 755 permission to all directories and files recursively.


    To set permissions on all directories under the folder server1 to 755
    Code:
    find /usr/home/username/server1/ -type d -exec chmod 755 {} \;

    To set permissions on all files under the folder server1 to 644
    Code:
    find /usr/home/username/server1/ -type f -exec chmod 644 {} \;
    FHCL likes this.

    Comment

    Working...
    X