California Penal Code 830.8 requires that BLM and USFS rangers have "written consent of the sheriff". Note that there are four "circumstances" where Feds may "exercise the powers of arrest", but those four "circumstances" are further qualified by the last paragraph of section 830.8(a) which begins "This subdivision does not apply..."
Below is the full text of sec. 830.8 (a). In my previous post I did not include the four "circumstances" as a way to emphasis "These officers have no authority to enforce California statutes without the written consent of the sheriff".
PENAL CODE SECTION 830.8
830.8. (a) Federal criminal investigators and law enforcement
officers are not California peace officers, but may exercise the
powers of arrest of a peace officer in any of the following
circumstances:
(1) Any circumstances specified in Section 836 or Section 5150 of
the Welfare and Institutions Code for violations of state or local
laws.
(2) When these investigators and law enforcement officers are
engaged in the enforcement of federal criminal laws and exercise the
arrest powers only incidental to the performance of these duties.
(3) When requested by a California law enforcement agency to be
involved in a joint task force or criminal investigation.
(4) When probable cause exists to believe that a public offense
that involves immediate danger to persons or property has just
occurred or is being committed.
In all of these instances, the provisions of Section 847 shall
apply. These investigators and law enforcement officers, prior to
the exercise of these arrest powers, shall have been certified by
their agency heads as having satisfied the training requirements of
Section 832, or the equivalent thereof.
This subdivision does not apply to federal officers of the Bureau
of Land Management or the Forest Service of the Department of
Agriculture. These officers have no authority to enforce California
statutes without the written consent of the sheriff or the chief of
police in whose jurisdiction they are assigned.