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

Re: [Sheflug] dumb question



Will Newton wrote:

>On Monday 16 Sep 2002 10:19 am, David Holden wrote:
>
>  
>
>>execute only if the file is a directory or already has execute
>>permission for some user (X).
>>
>>So I assume it sets the the file to execute only if the above conditions
>>are met.
>>    
>>
>
>But how is that useful?
>
>Seems to be equivalent to g+x on a directory and u+x on a file?
>
Yes, but only if it already has execute permission.  And I find it very 
useful.  Suppose that you have an untarred directory (for example) with 
owner root and permissions set to 600 or 700 (ie no-one except root can 
access the files in it), and you want to make the executables in it 
executable for everyone.  How do you do it?
chmod -R a+x is  not the right thing to do as it sets the execute file 
on everything; so instead you do
chmod -R a+X and it only sets the execute bits for directories (assuming 
root can execute them already)
and executables (ditto).

Matt.

>___________________________________________________________________
>
>Sheffield Linux User's Group -
>http://www.sheflug.co.uk/mailfaq.html
>
>  GNU the choice of a complete generation.
>
>  
>



___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.