The pfSense Store

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

0 Members and 1 Guest are viewing this topic.

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
cant edit some files in www folder using edit file
« on: September 27, 2015, 01:18:10 am »
im on the 2.2.5 nanobsd and i have some patched php files which i apply using edit file in web gui, specifically related to miniupnp and system.php, what i noticed is, snapshots since past one month dont save the files present in the www folder. Miniupnp.inc and xml do edit just fine but if i try the same with system.php, the page keeps says saving and gets stuck and never actually saves them

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 #1 on: September 27, 2015, 01:48:26 am »
Huh... Try System Patches package.
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 #2 on: September 27, 2015, 02:13:59 am »
ys i know i can use that but defies the purpose of edit file in gui when it wont save anything related to files in www folder

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 #3 on: September 27, 2015, 05:07:31 pm »
Hmmm... Just edited bunch of files, no such problem. Are you on nanobsd?
Do NOT PM for help!

Offline grandrivers

  • Sr. Member
  • ****
  • Posts: 566
  • Karma: +13/-2
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #4 on: September 27, 2015, 06:59:15 pm »
im on the 2.2.5 nanobsd and i have some patched php files which i apply using edit file in web gui, specifically related to miniupnp and system.php, what i noticed is, snapshots since past one month dont save the files present in the www folder. Miniupnp.inc and xml do edit just fine but if i try the same with system.php, the page keeps says saving and gets stuck and never actually saves them

looks like he said nano right from the get go
pfsense 2.4 super micro A1SRM-2558F
C2558 8gig ECC  60gig SSD
tripple Wan dual pppoe

Offline phil.davis

  • Hero Member
  • *****
  • Posts: 4612
  • Karma: +550/-3
    • View Profile
    • International Nepal Fellowship
Re: cant edit some files in www folder using edit file
« Reply #5 on: September 27, 2015, 08:01:22 pm »
I have no problem using the webGUI to edit on 2.2.5 nanobsd. I am guessing it will be some issue with the CF/SD card.
As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #6 on: September 28, 2015, 12:42:17 am »
if so then why do all other files except the ones in www folder edit just fine, if i try anything in the www folder, it would simply keep saying saving for ever and would never complete.

i even tried to mount CF as rw and then do the same but still no luck

Offline phil.davis

  • Hero Member
  • *****
  • Posts: 4612
  • Karma: +550/-3
    • View Profile
    • International Nepal Fellowship
Re: cant edit some files in www folder using edit file
« Reply #7 on: September 28, 2015, 01:31:08 am »
if so then why do all other files except the ones in www folder edit just fine, if i try anything in the www folder, it would simply keep saying saving for ever and would never complete.

i even tried to mount CF as rw and then do the same but still no luck
That is a good question! Is there anything in the system log?
If you go to a command line and edit something (e.g. with "ee") and save, then it might show you some error message when saving that will help find the cause.
As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: cant edit some files in www folder using edit file
« Reply #8 on: September 28, 2015, 05:11:05 am »
i tried using ee in serial console, i tried editing a file in www folder but on saving changes keeps saying unable to create file

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 #9 on: September 28, 2015, 05:11:54 am »
Well yeah that has nothing to do with the webGUI. It's still the same UFS shit over and over again. Reinstall to different media. Your current one is either dead or incompatible with the wonderful UFS filesystem.  ::)
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 #10 on: September 28, 2015, 05:21:23 am »
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

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 #11 on: September 28, 2015, 05:22:08 am »
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.

Code: [Select]
time rc.conf_mount_rw
ee /usr/local/www/system.php (make your changes)
time rc.conf_mount_ro

Observe how wonderfully it performs.  ::)
« Last Edit: September 28, 2015, 05:26:10 am by doktornotor »
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 #12 on: September 28, 2015, 05:24:03 am »
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

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 #13 on: September 28, 2015, 05:28:50 am »
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.
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 #14 on: September 28, 2015, 06:33:31 am »
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