pfSense Gold Subscription

Author Topic: cant edit some files in www folder using edit file  (Read 5773 times)

0 Members and 1 Guest are viewing this topic.

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +956/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #15 on: September 28, 2015, 06:35:55 am »
If it were the directory permissions, you wouldn't be able to edit anything there. Not just system.php. Really. Also, it's extremely easy to check the permissions.
Do NOT PM for help!

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #16 on: September 28, 2015, 06:37:02 am »
here is a dmesg log

Code: [Select]
$ dmesg
Copyright (c) 1992-2014 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.1-RELEASE-p20 #0 4c99fec(releng/10.1)-dirty: Mon Sep 21 12:06:53 CDT 2015
    root@pfs22-i386-builder:/usr/obj.RELENG_2_2.i386/usr/pfSensesrc/src.RELENG_2_2/sys/pfSense_wrap.10.i386 i386
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
VT: running with driver "vga".
CPU: Geode(TM) Integrated Processor by AMD PCS (498.06-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x5a2  Family = 0x5  Model = 0xa  Stepping = 2
  Features=0x88a93d<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
  AMD Features=0xc0400000<MMX+,3DNow!+,3DNow!>
real memory  = 268435456 (256 MB)
avail memory = 226222080 (215 MB)
pnpbios: Bad PnP BIOS data checksum
wlan: mac acl policy registered
kbd0 at kbdmux0
K6-family MTRR support enabled (2 registers)
random: <Software, Yarrow> initialized
ACPI BIOS Error (bug): A valid RSDP was not found (20130823/tbxfroot-223)
ACPI: Table initialisation failed: AE_NOT_FOUND
ACPI: Try disabling either ACPI or apic support.
cryptosoft0: <software crypto> on motherboard
padlock0: No ACE support.
pcib0 pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
Geode LX: PC Engines ALIX.2 v0.99m tinyBIOS V1.4a (C)1997-2007
pci0: <encrypt/decrypt, entertainment crypto> at device 1.2 (no driver attached)
vr0: <VIA VT6105M Rhine III 10/100BaseTX> port 0x1000-0x10ff mem 0xe0000000-0xe00000ff irq 10 at device 9.0 on pci0
vr0: Quirks: 0x2
vr0: Revision: 0x96
miibus0: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus0
ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
vr0: Ethernet address: 00:0d:b9:13:47:84
vr1: <VIA VT6105M Rhine III 10/100BaseTX> port 0x1400-0x14ff mem 0xe0040000-0xe00400ff irq 11 at device 10.0 on pci0
vr1: Quirks: 0x2
vr1: Revision: 0x96
miibus1: <MII bus> on vr1
ukphy1: <Generic IEEE 802.3u media interface> PHY 1 on miibus1
ukphy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
vr1: Ethernet address: 00:0d:b9:13:47:85
vr2: <VIA VT6105M Rhine III 10/100BaseTX> port 0x1800-0x18ff mem 0xe0080000-0xe00800ff irq 15 at device 11.0 on pci0
vr2: Quirks: 0x2
vr2: Revision: 0x96
miibus2: <MII bus> on vr2
ukphy2: <Generic IEEE 802.3u media interface> PHY 1 on miibus2
ukphy2:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
vr2: Ethernet address: 00:0d:b9:13:47:86
ath0: <Atheros 5413> mem 0xe00c0000-0xe00cffff irq 9 at device 12.0 on pci0
ath0: AR5413 mac 10.5 RF5413 phy 6.1
ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0063
isab0: <PCI-ISA bridge> port 0x6000-0x6007,0x6100-0x61ff,0x6200-0x623f,0x9d00-0x9d7f,0x9c00-0x9c3f at device 15.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <AMD CS5536 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xff00-0xff0f at device 15.2 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
ohci0: <OHCI (generic) USB controller> mem 0xefffe000-0xefffefff irq 12 at device 15.4 on pci0
usbus0 on ohci0
ehci0: <AMD CS5536 (Geode) USB 2.0 controller> mem 0xefffd000-0xefffdfff irq 12 at device 15.5 on pci0
usbus1: EHCI version 1.0
usbus1 on ehci0
cpu0 on motherboard
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xe0000-0xea7ff pnpid ORM0000 on isa0
atrtc0: <AT realtime clock> at port 0x70 irq 8 on isa0
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> at port 0x40 on isa0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
ppc0: parallel port not found.
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
uart0: console (115200,n,8,1)
uart1: <16550 or compatible> at port 0x2f8-0x2ff irq 3 on isa0
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
ugen0.1: <AMD> at usbus0
uhub0: <AMD OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <AMD> at usbus1
uhub1: <AMD EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0: <CF 1GB 20071116> ATA-0 device
ada0: Serial Number TSS20036081218011525
ada0: 16.700MB/s transfers (WDMA2, PIO 512bytes)
ada0: 991MB (2031120 512 byte sectors: 16H 63S/T 2015C)
ada0: Previously was known as ad0
random: unblocking device.
Timecounter "TSC" frequency 498060650 Hz quality 800
Root mount waiting for: usbus1 usbus0
uhub0: 4 ports with 4 removable, self powered
Root mount waiting for: usbus1
uhub1: 4 ports with 4 removable, self powered
Trying to mount root from ufs:/dev/ufs/pfsense0 [ro,sync,noatime]...
vr1: link state changed to DOWN
ng0: changing name to 'pppoe0'
vr1: link state changed to UP
vr0: link state changed to DOWN
tun1: changing name to 'ovpnc1'
pflog0: promiscuous mode enabled
DUMMYNET 0 with IPv6 initialized (100409)
load_dn_sched dn_sched FIFO loaded
load_dn_sched dn_sched QFQ loaded
load_dn_sched dn_sched RR loaded
load_dn_sched dn_sched WF2Q+ loaded
load_dn_sched dn_sched PRIO loaded
vr0: link state changed to UP
ovpnc1: link state changed to UP

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +956/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #17 on: September 28, 2015, 06:38:15 am »
Code: [Select]
$ ls -la /usr/local/pkg/miniupnpd.*
-rw-r--r--  1 root  wheel  8813 Jun  1 19:41 /usr/local/pkg/miniupnpd.inc
-rw-r--r--  1 root  wheel  5778 Jun  1 19:41 /usr/local/pkg/miniupnpd.xml

$ ls -la /usr/local/www/system.php
-rw-r--r--  1 root  wheel  20278 Jul 19 22:42 /usr/local/www/system.php

$ ls -ld /usr/local/www
drwxr-xr-x  19 root  wheel  285 Sep 27 23:47 /usr/local/www

Really nothing special there. It's the same like any other file there.

Looking at "CF 1GB" in the dmesg output - are you sure you simple are not out of space???

Code: [Select]
ada0: <CF 1GB 20071116> ATA-0 device
ada0: Serial Number TSS20036081218011525
ada0: 16.700MB/s transfers (WDMA2, PIO 512bytes)
ada0: 991MB (2031120 512 byte sectors: 16H 63S/T 2015C)
Do NOT PM for help!

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #18 on: September 28, 2015, 06:44:02 am »
i tried editing using winscp and that too fails

permissions r as below

Code: [Select]
$ ls -la /usr/local/pkg/miniupnpd.*
-rw-r--r--  1 root  wheel  8862 Sep 26 11:37 /usr/local/pkg/miniupnpd.inc
-rw-r--r--  1 root  wheel  5051 Sep 26 11:35 /usr/local/pkg/miniupnpd.xml

$ ls -la /usr/local/www/system.php
-rw-r--r--  1 root  wheel  20278 Sep 21 20:40 /usr/local/www/system.php

$ ls -ld /usr/local/www
drwxr-xr-x  17 root  wheel  8704 Sep 26 11:33 /usr/local/www

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #19 on: September 28, 2015, 06:45:47 am »
the CF is almost empty, i just use pfsense and the cron package

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +956/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #20 on: September 28, 2015, 06:47:08 am »
Almost empty? Pardon me, but if it shows almost empty, there's something very wrong with your FS. That space gives you rougly 450MB per each slice, which is just about enough for basic system. Could you just do a real check what's the space there? Because "almost empty" is nonsense.

Code: [Select]
$ df -h
Filesystem           Size    Used   Avail Capacity  Mounted on
/dev/ufs/pfsense0    908M    341M    494M    41%    /

This is from a 2GB CF nanobsd install. Just 2.2.4 system itself. As you can see there, that's almost 350MB, and the 2.2.5 thing is bigger, due to python being included.
Do NOT PM for help!

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #21 on: September 28, 2015, 06:52:50 am »
Code: [Select]
$ df -h
Filesystem           Size    Used   Avail Capacity  Mounted on
/dev/ufs/pfsense0    443M    248M    159M    61%    /
devfs                1.0K    1.0K      0B   100%    /dev
/dev/ufs/cf           49M    1.1M     44M     2%    /cf
/dev/md0              38M    572K     35M     2%    /tmp
/dev/md1              58M     13M     40M    25%    /var
devfs                1.0K    1.0K      0B   100%    /var/dhcpd/dev

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +956/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #22 on: September 28, 2015, 06:56:29 am »
Well, so much for almost empty. Other than that - backup the config and re-image the card... If that doesn't work, get a new one.
Do NOT PM for help!

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #23 on: September 28, 2015, 09:12:18 am »
seems like other things also broken, i did the below things

- got a brand new 2GB CF card and flashed the last 2.2.5 snap onto it
- booted and came to the web gui
- tried to restore backed up config and the page keeps going on and on
- tried multiple times and even with different browsers but still wont restore the config

now the thing about broken CF card is out of the picture and secondly something as simple as restoring the config using the web GUI should atleast work right, i even tried editing the file also from edit file page and situation is still same

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +956/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #24 on: September 28, 2015, 09:46:29 am »
Well, install 2.2.2 or older, restore config, upgrade... Again, you are chasing completely fails trails here with 2.2.5. This nanobsd thing got badly screwed with CF cards ever since the filesystem fiddling. Worst being 2.2.3 with the UFS+SU/J nonsense, completely unusable. 2.2.4+ is somehow usable with permanent RW.

Other than that, get a different CF brand. Some of the pfS devs suggested Transcend 133x cards were working well for him.
Do NOT PM for help!

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #25 on: September 28, 2015, 10:33:46 am »
well i keep my CF permanently RW and all the things i tried were with that only but still no luck

to get back online i had to replug old CF.

i dont have much issues in delay while moving from read only to read write, i use SLC cards
« Last Edit: September 28, 2015, 10:36:48 am by xbipin »

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #26 on: October 01, 2015, 03:49:14 am »
i mounted CF as RW permanent and then tried using ee to edit the system.php and then it edits fine but when i do it from edit file in gui it doesnt so i guess something wrong in the GUI in some php function or so which could be the cause of config also not restoring

even tried using winscp and am able to edit any file
« Last Edit: October 01, 2015, 04:22:38 am by xbipin »

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21373
  • Karma: +1431/-26
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #27 on: October 02, 2015, 11:04:42 am »
I can't reproduce this here on my ALIX. On the current 2.2.5 snap I can edit /usr/local/www/system.php and the edit works fine.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #28 on: October 04, 2015, 01:54:15 am »
how do we enable debugging in lighthttpd to figure out what is actually happening because no errors appear anywhere so its difficult to figure out whats going wrong

Offline robi

  • Hero Member
  • *****
  • Posts: 964
  • Karma: +75/-2
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #29 on: October 04, 2015, 01:59:03 am »
Maybe clearing your browser's cache or starting with a new browser on a new PC would help...