DarrenNEEDSHELP
DarrenNEEDSHELP

Reputation: 148

chmod recursive doesn't work

I'm running on OSX

chmod -R 755

Isn't the above supposed to change all files in the folder into that permission (755)?

usage:  chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
    chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...

I get ^ when I use chmod -R 755

Some other questions that I have

  1. How do you know what permission a file is before you download it? For example, this stack overflow page that I am currently on, what permission is it set as?

  2. On github, is there any way I can force permission on a file? For example, I want the index.html file to be downloaded with a 755 permission. Do I need to upload it with a 755 permission?

  3. -rw-r--r--@ What does the @ symbol mean in the end?

Upvotes: 0

Views: 2076

Answers (1)

brass
brass

Reputation: 23

To change all files in a directory to permissons 755 or rwxr-xr-x you need to specify the files to be changed.

Try:

chmod 755 *

To change all files. The permissions are bitfileds equaling 421 for rwx, for read write execute, respectively, listed as owner, group, other/everybody. Add together the bits you'd like for the permissions, so 4+2+1 is 7 for rwx for owner, 4+1=5 is r-x for group members, and 4+1=5 for everybody else. This results in rwx(owner)r-x(group)r-x(others)

When uploading, it depends on the method used, an ftp server will change permissions to suit the configuration.

Upvotes: 1

Related Questions