delivered the opinion of the court:
This is a suit brought by James H. and W. R. Hutchinson, partners, to enjoin the defendants, H. P. Stewart, Frank Bidwell, M. S. Warren, and E. .Kiddle, from prosecuting an action in trover against A. N. Hamilton, sheriff of Union County, for the value of one thousand sacks of flour, sold by him under an execution in favor of the plaintiffs against the Union Milling Company. At the time of the levy and sale, and prior thereto, the defendants had been the principal stockholders and directors of the Union Milling Company, and, as such, converted, it is alleged, in effect, a large amount of the property of such company to their own use for the purpose of hindering and defrauding its creditors. The object of the suit is to enjoin such action and to hold the defendants as trustees. Substantially the facts are, as found by the referee, that the plaintiffs are partners, doing business under the firm name of Hutchinson Brothers, and the Union Mining Company is a private corporation, operating a flouring mill; that between 1886 and May, 1888, the defendant company contracted indebtedness as follows: To the plaintiffs, in the sum of eight thousand dollars, and about nine hundred dollars; to the First National Bank of Union, five thousand dollars; to John M. Phy, three thousand dollars; to Caroline Blakeslee, two thousand six hundred dollars; to the firm of Noon & Co., seven hundred dollars; to J. W. Kennedy, seven hundred dollars; but of such indebtedness that of the First National Bank for five thousand dollars, and the plaintiffs for eight thousand dollars, were secured by a mortgage on the mill and the real estate upon which it is situated; that in September, 1888, Noon & Co., J. W. Kennedy, and Caroline Blakeslee, respectively, commenced an action in the circuit court against the milling company upon their claims as afore*221said, and respectively recovered judgments therefor which are duly docketed in the judgment lien docket, and that thereafter execution was issued upon the judgment of J. W. Kennedy, and the said mill and real property were sold thereunder to John Phy, who held a subsequent judgment lien upon them for the amount of his claim, and received a sheriff’s certificate of such sale; and that thereafter the said Phy, for a valuable consideration, assigned his certificate of sale and judgment to the plaintiffs and quit-claimed all his interest in the mill property to them.
About March, 1889, plaintiffs commenced an action against the Union Milling Company upon their claim of nine hundred dollars, and in September following obtained a judgment upon it which, with costs and disbursements, amounted in the aggregate to about one thousand dollars, but prior thereto the defendants became the owners by purchase of a majority of the stock of the milling company. In August, 1888, the defendants Stewart, Warren, and Bidwell, at a meeting of the stockholders, were elected directors of the company, and, as such, took charge of its business, but prior thereto the defendants Stewart and Warren had been directors of the company and had carried on its business under an arrangement with the stockholders whereby they agreed to advance the necessary funds to run the mill and to take warehouse receipts from the company to secure them, with the understanding that they should be reimbursed out of the first sale of the products of the mill. The mill was run under this arrangement for some time, and a large amount of indebtedness paid off out of the profits arising therefrom, but a number of actions having been brought against the company, and the defendants Warren and Stewart having refused to make further advances or purchase grain on their own account, it became impossible to operate the mill. The amount of money advanced and debts assumed by them for the company at this time was nine thousand three hundred and sixty-two *222dollars and thirty-five cents, and the amount of personal property belonging to the company, consisting of hay, horses, harness, wagons, wheat, flour, sundry accounts, etc., was valued at two thousand and eighty-three dollars. On the twenty-seventh of August, 1888, a meeting of the stockholders was called, after notice thereof, to determino what action the company should take under the circumstances; and at such meeting the board of directors stated to the stockholders that owing to the attachments then placed upon the mill property and the indebtedness of the company, they were unable to carry on the business, and that they must either rent the mill or close it up. The defendants Stewart and Bidwell proposed to lease the mill for a term of nine months, with the privilege of extending the lease to two years, and the meeting had been called to consider such proposition, when the secretary was authorized to lease the mill to the defendants Stewart and Bidwell for the sum of one hundred and fifty dollars a month; and thereafter the secretary executed said lease and the defendants took possession of the mill and operated it about eight months. Although the lease was made in the name of the defendants Stewart and Bidwell, the defendants Warren and Kiddle were interested in the same, and derived a profit therefrom of one thousand seven hundred dollars.
After the plaintiffs commenced their action against the company upon their claim of nine hundred dollars, they procured an attachment, and through A. N. Hamilton, the sheriff, attached and took from the possession of the defendants Stewart, Bidwell, Warren, and Kiddle one thousand sacks of flour containing fifty pounds each, etc. Said flour was the product of the mill while it was operated by the defendants, and was manufactured out of grain purchased and paid for by them. The defendants conducted and operated the mill under the lease with the knowledge of the stockholders and creditors of the com*223pany. None of the acts complained of by the plaintiffs were fraudulent, nor were the plaintiffs in any way prejudiced or injured thereby. The flour, when it was taken by the said Hamilton, belonged to and was the property of the defendants Bidwell, Warren, Stewart, and Kiddle. On the fourth day of September, 1889, or about that time, said defendants commenced an action against the said Hamilton. As conclusions of law, the referee found that the plaintiffs had failed to prove the allegations of their complaint, and that the suit ought to be dismissed at plaintiffs’ cost, and the defendants allowed to proceed with their action at law against the said Hamilton.
The]contention for the plaintiffs is that the flour, was the property of the milling company, and as such was liable to be seized by its creditors under any appropriate process and applied to the payment of its debts. The ground of this contention is that the acts of the directors in leasing the mill property to themselves, and applying its profits to the payment of indebtedness to some of their number, when the corporation was unable to continue its business, and was practically insolvent, were in violation of their fiduciary relation to the plaintiffs and other creditors, rendering the contract of leasing fraudulent and void as against them; and that, as a legal consequence, the flour manufactured under such lease, although out of grain bought by the defendants, became the property of the company, and subject to levy and sale for its debts, and the defendants became its creditors for the money advanced in the purchase of such grain. We do not think this position is tenable. “The law, for wise reasons,” said Ross, J., “ will not permit one who acts in a fiduciary capacity to deal with himself in his individual capacity ”: Davis v. Rock Creek Min. Co., 55 Cal. 364. The directors of a corporation occupy a fiduciary position, — they are trustees and agents of the corporation and stockholders, and are governed by the same rules as are applied to the dealings *224of other persons holding fiduciary relations. They are subject to the strict rules which govern the relation of trustee and cestui que trust in all their dealings. “Agency,” said Brewer, J., “implies trust, and no man may violate a trust”: National Bank v. Drake, 29 Kan. 313. The doctrine rests upon the simple principal of common honesty. As a director holds a place of trust, he is bound to execute it with the utmost fidelity. He cannot legally exercise powers for his own personal ends and against the interest of his beneficiary. He cannot deal with the trust property in his personal capacity, nor make profit out of it, nor assume a position antagonistic to his fiduciary character. He cannot unite in himself the character of buyer and seller. Hence he must account for all profits improperly made, and for all moneys improperly received. As Mr. Perry says: “And so all advantages, all purchases, all sales, and all sums of money received by the directors in dealing with the property of the corporation, are made and received by them as trustees of the corporation, and they must account for such moneys or advantages received by reason of their position as trustees”: 1 Perry, Trusts, § 207. When a corporation is insolvent and unable to carry on business, it holds its assets subject to the equitable claims of creditors. Its shareholders have no interest in the assets, as the payment of its debts will necessarily exhaust them; their equitable rights in the corporate property, owing to the company’s insolvency, have been superseded by the equitable rights of the creditors. The effect, however, of the insolvency, is not to alter the legal ownership of the property, nor to prevent the directors or agents of the corporation from representing it and managing its property for all authorized purposes; but it does alter the equitable interest of the shareholders and creditors in the property, and places the directors in a fiduciary relation to its creditors. In consequence of this, they are bound to manage the assets, which they now hold *225in trust, with strict regard for the interest of the creditors. “They cannot,” as Mr. Morawetz says, “give away property gratuitously, or sell it at a sacrifice in the interest of others, even with the consent of the shareholders, or in any manner use their powers for the purpose of obtaining an advantage for themselves.” And again he adds: “Directors of an insolvent corporation who have claims against the company as creditors, must share ratably with the other creditors in the distribution of the company’s assets. They cannot secure to themselves any advantage or preference over other creditors, by using their powers as directors for that purpose. These powers are held by them in trust for all the creditors, and cannot be used for their own benefit”: Morawetz, Corporations, §§ 787, 788.
From those considerations it will appear that when a corporation is unable to continue its business, and is in fact insolvent, its assets become a trust fund for the payment of its indebtedness, and the directors are only entrusted with its management for the benefit of its creditors; that they occupy a fiduciary relation to such creditors, and are governed in their dealings by the same strict rules as apply to other trust relations; that they are bound to manage the assets of the corporation with strict regard for the interests of its creditors, and. must not allow their private interests to conflict with the discharge of their fiduciary duties; that they cannot use their powers for the purpose of obtaining an advantage to themselves, nor for securing any advantage or preference over other creditors, but that they will be held strictly accountable for all profits improperly made, or moneys improperly received or expended. As the stockholders have no beneficial interest in the assets of an insolvent corporation, they cannot be affected by the fraud of the directors in the management of its property, or in dealing with it in their personal capacity, or in using their powers for the purpose of obtaining some advantage to themselves, or some pref*226erence over other creditors. In such case, the creditors alone are affected by the fraud of the directors, and they alone have an interest in avoiding their contracts or dealings, and in compelling them to account for the profits made or advantages gained. The plaintiffs, therefore, as creditors of the Union Milling Company, are entitled to bring a suit in equity against the defendants as its directors, to compel them to account for the management of its assets, or, if the defendants have been dealing with the trust property in their personal capacity, that is, have been operating the mill for their own private advantage, without regard to the interests of the creditors, to require them to account for the profits made by a violation of duty. The facts show that the defendants own nearly all the stock of the company, are its directors, and that the company is insolvent; that two of the defendants— Stewart and Warren — are, among others, its creditors; that the defendants called a meeting to consider the proposition of Stewart and Warren to lease the mill, and that such proposition was accepted, and a lease executed to them, although the two other defendants and directors— Kiddle and Bidwell — were interested in said lease; that they purchased with their own funds the wheat which was ground in the mill and manufactured into flour for market, and that the flour attached by the plaintiffs and sold by the sheriff, was the product of such mill, and was manufactured out of grain bought by them; that they operated the mill for about nine months and derived a net profit therefrom of one thousand seven hundred dollars, which was applied to .the payment of the claims of the defendants Stewart and Warren; that they paid one hundred and fifty dollars a month rent for the mill, but the money so paid went immediately back to Stewart and Warren as creditors. From these facts the referee found there was no fraud, and that the suit ought to be dismissed, which the court confirmed.
*227While there are many cases in which the courts refuse to tolerate or to inquire into the fairness of transactions entered into in violation of the rule that forbids a trustee from dealing with the trust property in his personal capacity, there are others which permit an investigation of such transactions, but impose upon the trustee or agent the burden of vindicating his dealings, and establishing their fairness and equity: Story, Agency, §§ 210, 211; Story, Equity Jurisprudence, § 322; 1 Perry, Trusts, §209; Morawetz, Private Corporations, § 245; Angel & Ames, Corporations, § 233. But the authorities are clear that the directors cannot deal or contract with themselves in their personal capacity, and appropriate the profits arisipg from the transaction in payment of the company’s indebtedness to themselves. Their powers are held for the benefit of all the creditors, and cannot be used for their own benefit or advantage. They are incapacitated as directors from using such powers for the purpose of obtaining an advantage to themselves, or securing preference over other creditors. The defendants as directors, by contracting with themselves in making the lease, were enabled out of the profits arising out of the trust property to pay much of the company’s indebtedness to themselves, and thereby to obtain an advantage and secure a preference over other creditors.
There is another matter, not contained in the record, to which we feel bound to advert. In the course of his oral argument, one of the counsel for the defendants admitted in substance that the defendant Stewart had no interest originally in the company, but had loaned money to one of its stockholders, and had taken its stock as collateral; that the company having failed, the collateral became worthless, whereupon the owner thereof, being also insolvent, transferred the same to the defendant Stewart, and that it was in payment of this indebtedness in part to which the profits of the mill were applied. In *228this matter the defendant Stewart was not a creditor of the company, nor was the company indebted to him. Hence, it was not in paying the company’s indebtedness to which the profits of operating the property were applied. If this be true, it only emphasizes all the more strongly the right of the creditors to have an accounting of the profits, and that they be ratably distributed. The creditors are the parties affected by the transaction, and they have a right to have it set aside, and to have an account for the profits realized.
But these conclusions are only applicable to a suit brought by the creditors to set aside a contract and compel the defendants to account for any profits derived from it, and that such profits, if there be any, be ratably distributed among the creditors of the company. Plaintiffs have brought no such suit, nor do they seek to accomplish such object by the one which they have brought. The object of their suit is to have the action at law to recover the value of the flour which was levied upon and sold perpetually enjoined, and the proceeds derived from its sale applied in payment of their judgment, and then whatever surplus shall remain or other profits there may be from the defendants operating the mill under the lease, that the plaintiffs have a decree applying a pro rata thereof on their demand of eight thousand dollars, and for this purpose that the defendants be declared trustees for the benefit of creditors. Unless, therefore, the flour which was attached and sold was the flour of the company, plaintiffs must fail in this suit, as they do not seek by it to have an accounting of the alleged illegal transaction for the purpose of ratably distributing its fruits or profits among its creditors. When profits are made by a violation of duty, the law will not permit the agent, for obvious reasons, to reap the fruit of his misconduct, but holds him as a trustee of such profits for the benefit of creditors. It is the fruit of the illegal transaction, the profits arising from it or an *229advantage gained by it, which the suit must be brought to secure for a pro rata distribution among creditors, and to which the agent is bound to respond as trustee. The profits of the transaction, whether legal or illegal, are the gain or advantage realized after deducting the losses and expenses. Money advanced in buying wheat and manufacturing it into flour is an expense which must be deducted before the profits of the transaction can be ascertained for which the defendants are liable to account as trustees for the benefit of creditors; hence the wheat which the defendants purchased, or the flour into which it was manufactured by them, cannot be regarded as profits, or constitute the advantage derived from operating the mill under the lease, but either one or the other is to be considered as an expense and taken into account in ascertaining the profits. This being so, the expense of producing the flour stands to the credit of the defendants, as they are entitled to have it deducted in determining the profits derived from operating the trust property, it must therefore be the defendants’ property and not the property of the company, and consequently not liable for attachment for its debts. In view of these considerations it follows that the plaintiffs are not entitled to have the action at law enjoined, nor to have the relief prayed for.
The decree, therefore, must be aeeirmed and the bill dismissed.