Page 1 of 1

BD D8090 patched firmware samba.init error

Posted: Fri Sep 28, 2012 12:13 am
by e3xtreme
when trying to mount samba shares I get the line

Code: Select all

/dtv/cgi-bin/test.cgi: line 20: /mtd_down/widgets/user/SamyGOE/SamyGO/etc/init.d/04_04_samba.init: Permission denied
what can cause this problem, or does anybody have similar problems? I suspect the internal HDD to be mounted causes the error...

my 04_04_samba.init:

Code: Select all

#!/bin/sh
#
# ? Copyright 1996-2010, ZsoltTech.Com
#       by Ser Lev Arris <arris@ZsoltTech.Com>
#
#       donated for the SamyGo Project
#       http://samygo.sourceforge.net/
#
#       Version: SamyGO svn $Id: 04_04_samba.init 1069 2011-01-03 16:47:24Z arris69 $
#

. /dtv/SGO.env
# sleep 9
##### CHANGE MEEEEE !!!!! ######
USER="bluray"
PASSWD="my07Password"
PERM="rw" # can be ro or rw
##### CHANGE MEEEEE END ######

[ -e /mtd_rwarea/smb_userdata ] && source /mtd_rwarea/smb_userdata

[ -z $USER ] && exit 1
[ -z $PASSWD ] && exit 1

DEST_DIR=$MOUNT_PATH
SERVER="192.168.1.166"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="HD Movies"
FR_NAME="Samba Server"
# M_OPTS="rw,user=${USER},password=${PASSWD}"
M_OPTS="$PERM,user=${USER},password=${PASSWD},codepage=cp1250,iocharset=utf8"

SERVERS="Don't set me!!"

do_mount()
{
#      $(echo -e "[sdh]\nVendor : CifsMount\nProduct : $FR_NAME\n\
#Serial : Q80VQLFH\nDevpath : 8\nLun : 0\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/log)

   for i in $S_MOUNTS ; do
      i="$(echo -n $i | sed -e 's/SGOspace/ /g')"
      M_POINT="$DEST_DIR/$1/$(echo -n $i | sed -e "s/\\\$/_/g")"
      mkdir -p "$M_POINT" 
      if [ `cat /proc/mounts | grep -c "$M_POINT"` -lt "1" ] ; then   
         /bin/busybox mount -o "${M_OPTS}" -t cifs "//$1/$i" "$M_POINT"
      else
         echo "$M_POINT is mounted!"
      fi

   done
}

get_shares()
{
   echo "Search Shares" 
   for i in $SERVERS ; do
   echo "on: $i" 
      S_MOUNTS=$(smbclient -s "$SYSROOT/etc/samba/smb.conf" -U ${USER}%${PASSWD} \
      -g -L $i | grep "Disk|" | grep -v "\\$" | grep -v " Service" | sed -r 's/.*\|(.*)\|.*/\1/' | sed -r 's/ /SGOspace/g')   
      # -g -L $i | grep "Disk|" | grep -v "\\$" | grep -v " Service" | cut -d "|" -f2)   
   [ -n "$S_MOUNTS" ] && do_mount $i
   done
}

get_servers()
{
   if [ -z "$SERVER" ] ; then
      # SERVERS=$(cat /proc/net/arp | grep -v "IP address" | cut -d " " -f1)
      SERVERS=$(cat /proc/net/arp | grep -v "IP address" | sed 's/^\(\w*.\w*.\w*.\w*\) *.*/\1/')
   else
      SERVERS=$SERVER
   fi
}

case $1 in 
   start)
   insmod $MOD_DIR/kernel/fs/cifs/cifs.ko
   mkdir -p "$DEST_DIR"
   get_servers
   get_shares
   ;;
   stop)
   # may can fail if device access the mount from content library
   # for i in $(cat /proc/mounts | grep cifs | cut -d " " -f2) ; do
   for i in $(cat /proc/mounts | grep cifs | grep "$DEST_DIR" | sed 's/^\(.*\) \(.*\) cifs .*/\2/') ; do
      i="$(echo -n $i | sed -r 's/\\040/ /g')"
      /bin/busybox umount "$i"
   done
   ;;
   status)
   /bin/mount | grep "$DEST_DIR"
   ;;
   *)
   echo "Usage: $0 {start|stop}" 1>&2
   exit 0
   ;;
esac
every Help is highly appreciated

THX :D

Re: BD D8090 patched firmware samba.init error

Posted: Fri Sep 28, 2012 3:40 am
by juusso
chmod 755 and try again.

Re: BD D8090 patched firmware samba.init error

Posted: Sat Sep 29, 2012 3:56 pm
by e3xtreme
juuso wrote:chmod 755 and try again.
is this line for my problem? I have to write it in the samba.init, haven't I?

Thank you :D

Re: BD D8090 patched firmware samba.init error

Posted: Sat Sep 29, 2012 3:57 pm
by juusso
Your problem is file permissions for this modded samba.init script, you don`t need to write in to it anything.

Re: BD D8090 patched firmware samba.init error

Posted: Sat Sep 29, 2012 4:14 pm
by e3xtreme
OK sorry, I thought it could be a problem of the firmware, cause nobody has this player working with samba yet....

Re: BD D8090 patched firmware samba.init error

Posted: Sat Sep 29, 2012 4:30 pm
by juusso
Connect over console and execute:

Code: Select all

chmod 755 /mtd_down/widgets/user/SamyGOE/SamyGO/etc/init.d/04_04_samba.init

Re: BD D8090 patched firmware samba.init error

Posted: Sat Sep 29, 2012 6:55 pm
by e3xtreme
do I need a serial cable and open the Player or is it also working over ethernet?
Will it have the rights, when restarting?
Another issue with this firmware is that the player takes forever to shutdown..., but this problem isn't too bad
and thx for the hint will try it the next days and report back

Re: BD D8090 patched firmware samba.init error

Posted: Sat Sep 29, 2012 7:14 pm
by juusso
what is webshell needed for?

Re: BD D8090 patched firmware samba.init error

Posted: Sat Sep 29, 2012 7:39 pm
by e3xtreme
Just wanted to make sure ; ).... THX a lot