Commands via Web Interface fail - command line works

Post any question, feedback you have regarding the Philips SPD8020 in this forum

Re: Commands via Web Interface fail - command line works

Postby Jocko » Wed Aug 03, 2016 4:09 pm

This time I think to understand what happens...

On sudo side there is no issue with your version but I think you did an oversize cleaning on /dev folder
Code: Select all
sh: can't create /dev/null: Permission denied
So that means /dev/null node is no longer exists...
As the firmware uses often this node for wasting the standard output with sudo, the shell commands run by php fail...

So try to create again the node
Code: Select all
mknod /dev/null c 1 3
chmod 666 /dev/null


reboot the NAS and try to change some settings on the web-interface

and post also the content of /dev
Code: Select all
ls -a /dev
to check if some other nodes are not missing for your platform
User avatar
Jocko
Site Admin - expert
 
Posts: 7170
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Commands via Web Interface fail - command line works

Postby rikharbers » Wed Aug 03, 2016 4:57 pm

/dev/null did exist on the system ....

the contents of /dev:

Code: Select all
.                md113  md43  md88                ram0        tty13  tty58
..               md114  md44  md89                ram1        tty14  tty59
1-1              md115  md45  md9                 ram2        tty15  tty6
1-1.2            md116  md46  md90                ram3        tty16  tty60
btns             md117  md47  md91                ram4        tty17  tty61
console          md118  md48  md92                ram5        tty18  tty62
core             md119  md49  md93                ram6        tty19  tty63
cpu_dma_latency  md12   md5   md94                ram7        tty2   tty7
discover         md120  md50  md95                ram8        tty20  tty8
err              md121  md51  md96                ram9        tty21  tty9
event0           md122  md52  md97                ramdisk     tty22  ttyp0
flush            md123  md53  md98                random      tty23  ttyp1
full             md124  md54  md99                revalidate  tty24  ttyp2
fuse             md125  md55  mem                 rtc         tty25  ttyp3
i2c-0            md126  md56  mice                rtc0        tty26  ttyp4
initrd           md127  md57  mtd                 rtc-old     tty27  ttyp5
inotify          md13   md58  mtd0                sda         tty28  ttyp6
input            md14   md59  mtd2                sda1        tty29  ttyp7
interfaces       md15   md6   mtd2ro              sda2        tty3   ttyp8
kmem             md16   md60  mtdblock0           sda3        tty30  ttyp9
kmsg             md17   md61  mtdblock1           sda4        tty31  ttypa
log              md18   md62  mtdblock2           sda5        tty32  ttypb
loop0            md19   md63  net                 sda6        tty33  ttypc
loop1            md2    md64  network_latency     sda7        tty34  ttypd
loop2            md20   md65  network_throughput  sda8        tty35  ttype
loop3            md21   md66  nfsd                sda9        tty36  ttypf
loop4            md22   md67  null                sdb         tty37  ttyS0
loop5            md23   md68  null?               sdb1        tty38  ttyS1
loop6            md24   md69  port                sdb2        tty39  ttyS2
loop7            md25   md7   ppp                 sdb3        tty4   ttyS3
loop8            md26   md70  ptmx                sdb4        tty40  tun
loop9            md27   md71  pts                 sdb5        tty41  .udev
md0              md28   md72  ptyp0               sdb6        tty42  urandom
md1              md29   md73  ptyp1               sdb7        tty43  usb1
md10             md3    md74  ptyp2               sdb8        tty44  usbdev1.1
md100            md30   md75  ptyp3               sdc         tty45  usbdev1.2
md101            md31   md76  ptyp4               sdd         tty46  usbdev1.3
md102            md32   md77  ptyp5               sg0         tty47  usbdev1.4
md103            md33   md78  ptyp6               stderr      tty48  usbdev1.6
md104            md34   md79  ptyp7               stdin       tty49  vcs
md105            md35   md8   ptyp8               stdout      tty5   vcsa
md106            md36   md80  ptyp9               systty      tty50  X0R
md107            md37   md81  ptypa               tgt         tty51  XOR
md108            md38   md82  ptypb               tty         tty52  zero
md109            md39   md83  ptypc               tty0        tty53
md11             md4    md84  ptypd               tty1        tty54
md110            md40   md85  ptype               tty10       tty55
md111            md41   md86  ptypf               tty11       tty56
md112            md42   md87  ram                 tty12       tty57


Rebooting did not resolve the issue - the web interface is still not able to perform the share commands.

I'm sorry for the troubles, this seems to be a tricky one ..

Rik
rikharbers
 
Posts: 30
Joined: Tue Jan 06, 2015 8:27 pm
Location: Zwitserland

Re: Commands via Web Interface fail - command line works

Postby Jocko » Wed Aug 03, 2016 5:00 pm

Please to post
Code: Select all
ls -al /dev/null
User avatar
Jocko
Site Admin - expert
 
Posts: 7170
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Commands via Web Interface fail - command line works

Postby rikharbers » Wed Aug 03, 2016 5:04 pm

Code: Select all
crw-rw----  1 root root 1, 3 2008-01-03 21:06 /dev/null


cheers,

Rik
rikharbers
 
Posts: 30
Joined: Tue Jan 06, 2015 8:27 pm
Location: Zwitserland

Re: Commands via Web Interface fail - command line works

Postby Jocko » Wed Aug 03, 2016 5:08 pm

So permissions on it are wrong : no rw access for all users and then my previous explanation is still valid.

then change them
Code: Select all
chmod 666 /dev/null
and reboot the nas and ...

---edit---
this node "null?" is strange : can you post
Code: Select all
ls -al /dev/null\?
User avatar
Jocko
Site Admin - expert
 
Posts: 7170
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Commands via Web Interface fail - command line works

Postby rikharbers » Wed Aug 03, 2016 5:19 pm

hmmm

the chmod works, the web interface also works afterwards!!

but after a reboot:

Code: Select all
crw-rw----  1 root root 1, 3 2008-01-03 21:06 /dev/null


Maybe just perform the chmod and then the update to 16-1 ?
rikharbers
 
Posts: 30
Joined: Tue Jan 06, 2015 8:27 pm
Location: Zwitserland

Re: Commands via Web Interface fail - command line works

Postby Jocko » Wed Aug 03, 2016 5:27 pm

Do you use some user boot scripts ?
If yes check if you do not have somewhere a line like this
Code: Select all
chmod 660 /dev
or if you edited the file /etc/init.d/rcS, research this line on it.

Maybe just perform the chmod and then the update to 16-1 ?
Yes you can try to do it
User avatar
Jocko
Site Admin - expert
 
Posts: 7170
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Commands via Web Interface fail - command line works

Postby rikharbers » Wed Aug 03, 2016 7:19 pm

Success !!

Firmware now at 16-1 and the permissions of /dev/null are correct after reboot.
Web interface has all the normal functionality :bananadance

Jocko and fvdw, many thanks for the lengthy error-seeking and, of course, for taking the initiative for this firmware in the first place.
It keeps my good ol' Philips NAS humming!

Best,

Rik
rikharbers
 
Posts: 30
Joined: Tue Jan 06, 2015 8:27 pm
Location: Zwitserland

Re: Commands via Web Interface fail - command line works

Postby Jocko » Wed Aug 03, 2016 7:56 pm

Nice!

It was not so easy to understand what was the issue...

Think to install all patches for version 16.1 available on the download forum.
User avatar
Jocko
Site Admin - expert
 
Posts: 7170
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Previous

Return to Philips SPD8020

Who is online

Users browsing this forum: No registered users and 1 guest