Cant edit some files in www folder using edit file
-
what do u mean dead, it works fine, upgrades also work all good, its currently on UFS, other than saving to www folder all the other functions work perfectly fine
-
I am 300% sure your issue will go away as soon as you switch to 2.2.2 or older, predating the UFS improvements. If you want to use something newer, also 300% sure it won't work with your media.
time rc.conf_mount_rw ee /usr/local/www/system.php (make your changes) time rc.conf_mount_ro
Observe how wonderfully it performs. ::)
-
it was saving files on 2.2.4 perfectly fine, i have another alix box with a different CF and on that too it saves in pfsense 2.2.4.
just with recent snaps of 2.2.5 it stopped saving, older snaps of 2.2.5 it was saving fine
-
Yeah OK. See hints above. Merely telling you that UFS is broken beyond repair with CF (or any "slow" media in general). Additionally, if you only see this with specific files, I'm very sure the media is faulty or filesystem broken, definitely not "working fine". Again, there are logs, or dmesg even.
-
the logs etc dont mention anything of failure and i think it has to be something with the permissions on the www folder because almost any other file i tried outside it works, just all the files within the www folder exhibit this behaviour and even upgrading to a newer snap has the same issues
-
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.
-
here is a dmesg log
$ 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 10="" vt6105m="" rhine="" iii="" 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 10="" vt6105m="" rhine="" iii="" 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 10="" vt6105m="" rhine="" iii="" 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 1="" 9="" ohci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr=""> on usbus0 ugen1.1: <amd> at usbus1 uhub1: <amd 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr=""> on usbus1 ada0 at ata0 bus 0 scbus0 target 0 lun 0 ada0: <cf 20071116="" 1gb=""> 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</cf></amd></amd></amd></amd></at></at></isa></amd></ohci></ata></ata></amd></isa></pci-isa></atheros></generic></mii></via></generic></mii></via></generic></mii></via></encrypt></pci></software></software,></mmx+,3dnow!+,3dnow!></fpu,de,pse,tsc,msr,cx8,sep,pge,cmov,clflush,mmx>
-
$ 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???
ada0: <cf 20071116="" 1gb="">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)</cf>
-
i tried editing using winscp and that too fails
permissions r as below
$ 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
-
the CF is almost empty, i just use pfsense and the cron package
-
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.
$ 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.
-
$ 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
-
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.
-
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
-
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.
-
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
-
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
-
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.
-
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
-
Maybe clearing your browser's cache or starting with a new browser on a new PC would help…