<tt><font size=2>centos-bounces@centos.org wrote on 23.06.2010 13:31:56:<br>
<br>
> James Corteciano <james@linux-source.org> </font></tt>
<br><tt><font size=2>> Gesendet von: centos-bounces@centos.org<br>
> </font></tt>
<br><tt><font size=2>> 23.06.2010 13:32</font></tt>
<br><tt><font size=2>> <br>
> Bitte antworten an<br>
> CentOS mailing list <centos@centos.org></font></tt>
<br><tt><font size=2>> <br>
> An</font></tt>
<br><tt><font size=2>> <br>
> CentOS mailing list <centos@centos.org></font></tt>
<br><tt><font size=2>> <br>
> Kopie</font></tt>
<br><tt><font size=2>> <br>
> Thema</font></tt>
<br><tt><font size=2>> <br>
> [CentOS] umask not functioning with cp command</font></tt>
<br><tt><font size=2>> <br>
> Hi all,</font></tt>
<br><tt><font size=2>> <br>
> $ umask 0002</font></tt>
<br><tt><font size=2>> $ mkdir test</font></tt>
<br><tt><font size=2>> $ ls -ld test</font></tt>
<br><tt><font size=2>> drwxrwxr-x 2 user user 4096 Jun 23 19:04 test/</font></tt>
<br><tt><font size=2>> <br>
> $ls -ld content</font></tt>
<br><tt><font size=2>> drwxr-xr-x 2 user user 4096 Jun 23 19:29 content</font></tt>
<br><tt><font size=2>> <br>
> $ cp -r content test/</font></tt>
<br><tt><font size=2>> $ls -ld test/content</font></tt>
<br><tt><font size=2>> drwxr-xr-x 2 user user 4096 Jun 23 19:29 content</font></tt>
<br><tt><font size=2>> <br>
> My question is, how can I make content directory permission mode to
<br>
> 775 if I do cp inside the test directory?</font></tt>
<br><tt><font size=2>> <br>
> Thanks.</font></tt>
<br><tt><font size=2>> <br>
> Regards,</font></tt>
<br><tt><font size=2>> James</font></tt>
<br><tt><font size=2>> <br>
> _______________________________________________<br>
> CentOS mailing list<br>
> CentOS@centos.org<br>
> </font></tt><a href=http://lists.centos.org/mailman/listinfo/centos><tt><font size=2>http://lists.centos.org/mailman/listinfo/centos</font></tt></a>
<br>
<br><tt><font size=2>Hi James,</font></tt>
<br><tt><font size=2>in this case, you must copy with cp -p (or better
-a same -dpR) to preserve all atributes.</font></tt>
<br>
<br><tt><font size=2>man cp</font></tt>
<br>
<br><font size=2 face="sans-serif">Gruß <br>
Andreas Reschke<br>
________________________________________________________________<br>
BG-IM173<br>
Unix/Linux-Administration<br>
 <br>
Behr GmbH & Co. KG</font>