Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 1996 10:59:02 +0000 ()
From:      James Raynard <fqueries@jraynard.demon.co.uk>
To:        Annelise Anderson <andrsn@andrsn.stanford.edu>
Cc:        questions@freebsd.org
Subject:   Re: 2.1.5 /etc/daily permissions
Message-ID:  <199608061059.KAA01770@jraynard.demon.co.uk>
In-Reply-To: <Pine.BSI.3.94.960805075134.2682A-100000@andrsn.stanford.edu> from "Annelise Anderson" at Aug 5, 96 07:56:09 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> I've been merging (alphabetically, which may not be such a great
> idea) the 2.1.5 /usr/src/etc files with my old /etc, and
> noticed that in /usr/src/etc the daily, weekly and monthly
> files have 644 permissions....whereas the old ones are 755.
> 
> I don't think they'll run with 644, will they?  I would
> think 744 would be appropriate.
 
According to crontab(5), the command is executed by /bin/sh,
ie it's the equivalent of typing

sh my_command

at the command prompt rather than

./my_command

The first case doesn't need the script to have execute permissions
as it's just being used as input to /bin/sh, rather than as a 
command in its own right.  In the second case, you're using the 
script as a command itself, so you would need it to be an executable.

(Obviously, if you put in a SHELL=/something/else line in 
/etc/crontab, they would be executed by the /something/else, 
but the principle's the same).

In other words, yes, I'd expect them to work with 644 :-)

> In general, are the permissions in /usr/src/etc designed to
> be right, or designed to need configuration?

I haven't checked this, but I think that everything in the src tree
has the executable bits turned off (presumably to prevent accidents
like a hacked-but-not-yet-tested script being run instead of one of
the system ones).




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608061059.KAA01770>