Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] How to create users using php or javascript in mosquitto

Hi again Srinivas.

On 2016-08-01 09:14, Srinivas Pokala wrote:
> usernames write into "passwd" file, but when file size reached
> 20-30kb removed old data and  file writing started from 0kb
> is there any file size limit in config file?

Doesn't seem so, here's 5000 users generated by mosquitto_passwd
occupying ~600KiB;

$ touch ~/mosq_passwd_test
$ for i in $(seq 0 5000); do mosquitto_passwd -b ~/mosq_passwd_test
Bitten$i Insect; done
$ ls -l ~/mosq_passwd_test
-rw-rw-r-- 1 miki miki 599010 Aug  1 09:40 /home/miki/mosq_passwd_test
$ wc -l ~/mosq_passwd_test
5001 /home/miki/mosq_passwd_test

> otherwise how can I resolve this?

Find out who zeroes the file while processing it in your environment?
Without more elaborate information or code to look at we can only do
guesswork. Maybe your are writing to the file from different processes?

Have you considered the pure PHP approach I suggested in This
is much more clean and surely more secure and efficient than shelling
out for every user.


Attachment: signature.asc
Description: OpenPGP digital signature

Back to the top