I've run into this strange problem that if I use opkg to install
mgetty then the files in  /etc/mgetty+sendfax/ get set with the
correct permissions (0600).  However if I build mgetty into the image
and do a clean flash then the permissions revert to providing read and
write permissions to non root users. That is a problem because mgetty
refuses to accept logins if the login.config file in that directory is
read or writeable by normal users.

The mgetty makefile has the correct "install  -m600"  command. I have
also tried created postinst scripts which do not fix the problem. The
package is fine if installed afterwards - but not if it is built into
the image.

It appears that this might be related to Sergey's findings below
regarding the default permissions of files. I could change 0755 to
0600 but not sure what havoc that could cause.    Other than putting
in a kludge to chmod every time the system boots - am at a loss

Ashok



On Sat, Nov 6, 2010 at 2:23 PM, Sergey Vlasov <v...@altlinux.ru> wrote:
>
> During the first OpenWrt boot after a clean flash (when the jffs2
> partition is not yet initialized) tmpfs is used instead of the usual
> jffs2 overlay filesystem.  If this tmpfs is mounted with default
> options, all directories created there (/etc, /etc/config, other
> subdirectories in /etc) get permissions 1777 by default, and these
> permissions then persist in the created jffs2 at least until
> subsequent sysupgrade.  Mounting tmpfs with mode=0755 fixes the
> permission problem.
>
> Signed-off-by: Sergey Vlasov <v...@altlinux.ru>
> ---
>  package/base-files/files/lib/functions/boot.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/package/base-files/files/lib/functions/boot.sh 
> b/package/base-files/files/lib/functions/boot.sh
> index fc93eba..66423d9 100644
> --- a/package/base-files/files/lib/functions/boot.sh
> +++ b/package/base-files/files/lib/functions/boot.sh
> @@ -142,7 +142,7 @@ fopivot() { # <rw_root> <ro_root> <dupe?>
>
>  ramoverlay() {
>        mkdir -p /tmp/root
> -       mount -t tmpfs root /tmp/root
> +       mount -t tmpfs -o mode=0755 root /tmp/root
>        fopivot /tmp/root /rom 1
>  }
>
> --
> 1.7.2.rc3.50.gbbbd
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to