FTP was working until I added syslog dataset

Status
Not open for further replies.

Jeren

Dabbler
Joined
Sep 14, 2013
Messages
26
I wanted saving of logs so I made a dataset called syslog. Great. I see all my logs there and everything almost works as it should.

Problem: FTP no longer starts up; gives me the error

Code:
freenas notifier: proftpd not running?
freenas notifier: proftpd not running?
freenas notifier: Starting proftpd.
freenas notifier: freenas.local proftpd[35512]: Fatal: SyslogFacility: unable to open syslog: Operation not permitted on line 10 of '/usr/local/etc/proftpd.conf'
freenas root: /usr/local/etc/rc.d/proftpd: WARNING: failed to start proftpd
freenas notifier: /usr/local/etc/rc.d/proftpd: WARNING: failed to start proftpd


my /usr/local/etc/proftpd.conf looks like

Code:
ServerName "freenas.local FTP Server"
ServerType standalone
DefaultServer on
#Default Address freenas.local
UseIPv6 on
Port 21
User nobody
Group nogroup
Umask 062 022
SyslogFacility ftp
MultilineRFC2228 off
DisplayLogin /var/run/proftpd/proftpd.motd
DeferWelcome off
TimeoutIdle 600
TimeoutLogin 300
TimeoutNoTransfer 300
TimeoutStalled 3600
MaxInstances none
 
 
MaxLoginAttempts 3
DefaultTransferMode ascii
AllowForeignAddress off
 
IdentLookups off
UseReverseDNS off
 
 
<Anonymous /mnt/URANAS>
  User ftp
  Group ftp
  UserAlias anonymous ftp
 
 
  <Limit LOGIN>
    AllowAll
  </Limit>
</Anonymous>
 
<Limit LOGIN>
  AllowAll
</Limit>
 
<Global>
  RequireValidShell off
  DefaultRoot ~ !wheel
#  RootLogin on
  AllowOverwrite on
#  AllowRetrieveRestart on
#  AllowStoreRestart on
  DeleteAbortedStores off
 
 
  TimesGMT off
</Global>
<IfModule mod_ban.c>
  BanEngine off
  BanControlsACLs all allow group wheel
  BanLog /var/log/proftpd/ban.log
  BanMessage Host %a has been banned
# -m "mod_ban/rule"
# -v "concat('  BanOnEvent ',event,' ',occurrence,'/',timeinterval,' ',expire)" -n
# -b
  BanTable /var/run/proftpd/ban.tab
</IfModule>
 
 
<IfModule mod_delay.c>
  DelayEngine on
  DelayTable "/var/run/proftpd/proftpd.delay"
</IfModule>
 
<IfModule mod_wrap.c>
  TCPAccessFiles /etc/hosts.allow /etc/hosts.allow
  TCPAccessSyslogLevels info warn
  TCPServiceName ftpd
</ifModule>


Line 10 corresponds to

Code:
SyslogFacility ftp


and I can only guess that there is some logging shenanigans going on. If I delete line 10 and try to start ftp again from the services tab, I get the same error and the proftpd.conf file seems to restore itself and render any previous changes void.

I cannot delete the syslog dataset because it is perpetually busy (tried turning off all plugins, jails, and servies). Is there a way to get my FTP back?
 

Jeren

Dabbler
Joined
Sep 14, 2013
Messages
26
Issue number 3218 has been created
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
If I delete line 10 and try to start ftp again from the services tab, I get the same error and the proftpd.conf file seems to restore itself and render any previous changes void.
The file is generated on service start. To test the change start the service from the CLI.

I cannot delete the syslog dataset because it is perpetually busy (tried turning off all plugins, jails, and servies).
To delete the dataset:
  1. Boot into single user mode
  2. # sh /etc/rc.initdiskless
  3. # zpool import -R /mnt poolname
  4. # zfs destroy poolname/syslog
  5. # shutdown -r now
 

Jeren

Dabbler
Joined
Sep 14, 2013
Messages
26
It works now, ended up deleting line 10 from /usr/local/etc/proftpd.conf and adding

Code:
proftpd_enable="YES"


to /var/tmp/rc.conf.freenas and /etc/rc.conf

service proftpd start now correctly works without giving me errors
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
I have the same problem you had...let's try and hope it works for me too
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
it doesn't work for me...
- I try to access via SSH in root mode
- i do "mount -uw /"
- i do all the steps u say
- i do "mount -ur /"
and it won't work
- i restart freenas
it keep not working + if i go to check /usr/local/etc/proftpd.conf the line 10 is again there...
where do i go wrong???
 

Jeren

Dabbler
Joined
Sep 14, 2013
Messages
26
What sort of errors did you get?

Sometimes after I run
Code:
service proftpd start

it doesn't work immediately and I have to go back to /usr/local/etc/proftpd.conf, delete line 10, add proftpd_enable="YES" to /etc/rc.conf, and CHANGE proftpd_enable="NO" on line 9 to proftpd_enable="YES" in /var/tmp/rc.conf.freenas. I run
Code:
service proftpd start

again and it starts up without problems.
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
Hi jeren, thank you for the answer.
Well i don't get a specific error, it just keep not working saying the same things
  1. freenas notifier: proftpd not running?
  2. freenas notifier: proftpd not running?
  3. freenas notifier: Starting proftpd.
  4. freenas notifier: freenas.local proftpd[35512]: Fatal: SyslogFacility: unable to open syslog: Operation not permitted on line 10 of '/usr/local/etc/proftpd.conf'
  5. freenas root: /usr/local/etc/rc.d/proftpd: WARNING: failed to start proftpd
  6. freenas notifier: /usr/local/etc/rc.d/proftpd: WARNING: failed to start proftpd

    I'll try again, but the problem is just that every time i do that it doesn't work, then i restart the nas and the line 10 in
    /usr/local/etc/proftpd.conf, is again there as it didn't save the changes...
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
well, i did all the tries i could...
if i do exactly what u suggest to do, and than run
  1. service proftpd start
from the shell, the ftp start to work, but if i reboot the nas, we are at the same point of the beginning...it doesn't keep the changes...how do i solve this?

I even tried to delate the syslog dataset doing:
  1. Boot into single user mode
  2. # sh /etc/rc.initdiskless
  3. # zpool import -R /mnt/DATI
  4. # zfs destroy DATI/syslog
  5. # shutdown -r now
but it doesn't delate anything because it says "no such dataset found"....
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
i have to do the zfs list after the import right? like this?
  1. Boot into single user mode
  2. # sh /etc/rc.initdiskless
  3. # zpool import -R /mnt/DATI
  4. zfs list
    I'll try this afternoon and let u know, now i don't have the Nas here with me
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
well i tried...and if i do

  1. Boot into single user mode
  2. # sh /etc/rc.initdiskless
  3. # zpool import -R /mnt/DATI
  4. zfs list
the system reply "no datasets available"...
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
Yes "DATI" is the name of my zpool.
I tried the exact command the first time, but i got an error, that's why i changed in /DATI
I'll try again and let u know. Thanks for the help
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
ImageUploadedByTapatalk1380804916.377061.jpg

The error is:
"cannot import 'DATI': no such pool available"
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
The error is:
"cannot import 'DATI': no such pool available"
Not that you provided any actual details of your pool, but guessing I would say it doesn't see the disks. You likely need to load some module first.

It may be sufficient to boot normally, stop syslogd and delete the dataset. I haven't actually tested it though.
Code:
service syslogd stop
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
My nas it's a really basic one, with just 2x2tb disk mirrored on an amd e350 pure mini mobo and 4gb ram
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
My nas it's a really basic one, with just 2x2tb disk mirrored on an amd e350 pure mini mobo and 4gb ram
Are the drives internal and connected directly to the motherboard? If so and stopping syslogd isn't enough:
Code:
zpool import

zpool status

camcontrol devlist

gpart show

glabel status
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
Yes the drives are internal and connected directly to the mobo. Tomorrow i'll try both ur solutions and report what happens to you. Thanks
 
Status
Not open for further replies.
Top