Neil Greenwood wrote:
> The reason that the directories 'vanished' is that execute permission
> is used to indicate that directories can be browsed i.e. listed in ls
> or Nautilus. When you did the chmod 664 it also worked on the
> directories, and then you couldn't look into them.

Neil >>> This was perhaps one of the most important things I learned, 
and I had not seen it in any of the books:  to see the directories at 
all you have to have exec permission, so at least the owner's octal has 
to be odd.  Not knowing this, I thought 664 would be simplest (Ockham's 
razor!).

    I see now why the Ubuntu default is 755 (all the digits odd) - 
everyone can, for starters, see the directories and their contents.

    So it wasn't that I got mixed up by using the octal method for 
permissions (pace, Robert!);  rather, I just didn't know enough about 
how permissions work.  In fact, like you Neil, I find the octal system 
simpler and neater to use for ordinary purposes: u/g/o maps to the digit 
positions, and their values map the rwx settings as 4/2/1 - easy-peasy 
(especially if you're fairly comfortable with maths!).  But perhaps 
there's some other reason (maybe to do with administering servers?) for 
using the letter notation?

    I do have one remaining question.  In the following compound command

find ~/music -type f -group diana -exec sudo chgrp root {} \; -exec
sudo chmod 755 {} \;

what is the function of ' {} \; '?

    I've gleaned that the last term is an escaped semi-colon. I guess 
this indicates the end of a specific group of commands;  and the 
semi-colon has to be escaped to show that it's a delimiter, rather than 
just the sign that the commands continue on the next line without a 
break?  But is the syntax more complex - maybe command sequences 
delimited by  -exec...\;  show that they all act on the output of the 
first command in the line (in this case, 'find ~/music -type f -group 
diana')?  As you see, I'm just guessing here - I'd be interested to 
understand what the syntax really is.

Best wishes
--
Diana




-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.kubuntu.org/UKTeam/

Reply via email to