Creating files and directories

Rodolfo J. Paiz rpaiz at simpaticus.com
Tue May 11 13:35:47 UTC 2004


At 05:34 5/11/2004, Manuel Arostegui Ramirez wrote:
>  --- Deleo Paulo Ribeiro Junior <deleo at dprj.eng.br>
>escribió:
> > I would like to have the status Read / Write /
> > Execute to Group set automaticaly.
>
>You can set an alias like alias mdkdir="mkdir && chmod
>777 -R"

NO!

Manuel, the advice you gave is not only wrong, it is also dangerous. Paulo 
asked how to give "rwx" permissions to the group, and you told him to give 
the ENTIRE WORLD permission to read and write to his directories. This is 
an enormous security hole and should NEVER be done. For the record:

         1. The permissions Paulo desires are 775, or "rwxrwxr-x".

         2. If you used 775 instead of 777, your command would work. 
However, it is not the best way.

         3. The correct answer is to change the "umask" variable as others 
have pointed out.

Cheers,


-- 
Rodolfo J. Paiz
rpaiz at simpaticus.com
http://www.simpaticus.com





More information about the redhat-list mailing list