Re: Antwort: umask not functioning with cp command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



From: Andreas Reschke <Andreas.Reschke@xxxxxxxxxxxxx>
>> James Corteciano <james@xxxxxxxxxxxxxxxx>  
>> $ umask 0002 
>> $ mkdir test 
>> $ ls -ld test 
>> drwxrwxr-x 2 user user 4096 Jun 23 19:04 test/ 
>> $ls -ld content 
>> drwxr-xr-x 2 user user 4096 Jun 23 19:29 content 
>> $ cp -r content test/ 
>> $ls -ld test/content 
>> drwxr-xr-x 2 user user 4096 Jun 23 19:29 content 
>> My question is, how can I make content directory permission mode to
>> 775 if I do cp inside the test directory? 
> in this case, you must copy with cp -p (or better
> -a same -dpR) to preserve all atributes. 
> man cp

-p preserves the source permissions...
In this case, he wants the target directory to inherit its permissions from its parent...
And I think Unix doesn't support the idea of inherited permissions (except for the sgid bit).
Is running a simple 'chmod 775 test/content', after the cp, not an option...?

JD


      
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux