Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 993195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:22:58+00:00 2026-05-16T06:22:58+00:00

chmod -R 775 *.cgi only changes permissions on the files in the current directory,

  • 0

chmod -R 775 *.cgi only changes permissions on the files in the current directory, the files in the subdirectory don’t get modified at all. This is the exact same functionality as simply doing chmod 775 *.cgi. I have seen people use solutions such as with find and whatnot. Ok great, but why does -R mode even exist if it doesn’t even accomplish anything?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:22:59+00:00Added an answer on May 16, 2026 at 6:22 am

    Probably because you have no directories named *.cgi. Quoth the manual:

    -R Recursively change file mode bits. For each file operand that names a
    directory, chmod shall change the file
    mode bits of the directory and all
    files in the file hierarchy below it.

    For example:

    $ ls -R
    .:
    a  a.c  b.c  c.c
    
    ./a:
    a.c  b.c  sub
    
    ./a/sub:
    a.c  b.c  
    $ chmod -R 444 *.c
    $ ls -l
    drwxr-xr-x 3 msw msw 4096 2010-08-12 18:07 a
    -r--r--r-- 1 msw msw    0 2010-08-12 18:07 a.c
    -r--r--r-- 1 msw msw    0 2010-08-12 18:07 b.c
    -r--r--r-- 1 msw msw    0 2010-08-12 18:07 c.c
    $ : directory a not affected
    $ chmod -R u-w a    
    $ ls -l a
    -r-xr-xr-x 1 msw msw    0 2010-08-12 18:07 a.c
    -r-xr-xr-x 1 msw msw    0 2010-08-12 18:07 b.c
    dr-xr-xr-x 3 msw msw 4096 2010-08-12 18:07 sub
    $ ls -l a/sub
    -r-xr-xr-x 1 msw msw    0 2010-08-12 18:07 a.c
    -r-xr-xr-x 1 msw msw    0 2010-08-12 18:07 b.c
    $ : got em
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed: chmod -R a+x adds execute permissions to all files, not just those
I am trying to use os.chmod to set directory permissions to ensure the webserver
I need to use chmod to change all files recursivly to 664. I would
Using chmod , I do chmod +x *.sh in the current directory but what
I can't understand why I have to use chmod to get the correct permissions..
I chmod'ed the directory to 777, same with the directory contents. Still, I get
I have a PHP script which changes file permissions on my server using chmod.
I ran namenode -format.This is my output. I tried changing the file permissions chmod
When I use chmod() to change permissions at run time, it gives me the
I got stuck when chmod a file. At the bottom of this page ,about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.