Linux chmod 777 Recursively

There are times that you want to set permission for a folder of files. It’s very tedious to change every single file, so you must ask: is there a way to chmod a folder recursively, so that all files in a folder or directory can be set to writable by one command? Well, the answer is: Yes. There is a way and it’s very simple. There is a recursive chmod

chmod -R 777 /home/shi/Desktop/Host/lab/txp

The above code will set permission for all files under /home/shi/Desktop/Host/lab/txp directory, you can change it to anything you may like to point to.

Hope this helps!

Be Sociable, Share!

About Shi Chuan

I am a web developer.
This entry was posted in Shell and tagged . Bookmark the permalink.

7 Responses to Linux chmod 777 Recursively

  1. Merps says:

    Thanks for the quick tip!

  2. Yoke Lee says:

    Hi Shi Chuan, howdie~ haha

    Found your article when browsing for this topic lol.
    Somehow the one works for me is:
    chmod 775 -R

  3. Hoan Huynh says:

    Thank you. It worked for me.

  4. Pingback: IRC caused me to use Linux! Quick how to setup a shell server. | Linux Admins

  5. EK says:

    This command saved me a lot of work. An application on my macbook just wouldn’t start until I changed the permission recursively to 777 for all the directories and files inside the top application directory. Thanks!

  6. riple says:

    I use windows but my hosting is Linux and this useful for me

  7. neildaemond says:

    Or, you can use these to chmod files and directories differently::
    for folders(directories):

    find . -type d -exec chmod 777 {} \;

    for files:

    find . -type f -exec chmod 666 {} \;

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>