You can then splice on a new piece of wire make sure it is the same wire gauge and run the new piece from the junction box back to the fixture box.
Rules for running electrical wire in attic.
While one person holds the flashlight the other person should use a staple gun to run the wire along the rafters from one entry hole to the other.
The attic wiring should be protected and secured to ceiling joists or other wood structural supports.
Bring all of the wire up into the attic.
The following links will assist you with your electrical question.
Electrical wire electrical wire for the home.
This video is.
An attic that is accessible which is defined by the nec as having a permanently installed stair or ladder in place must have protection for any cables that run across the top of the attic floor joists or within 7 feet where they run across the face of rafters or studs.
The staple gun should be loaded with wire staples designed for holding the size and type of wire you are running.
Working on your own electrical system is fine but only licensed electricians can work on someone else s.
Electrical wire for the home.
My attic is non accessible so i know for a fact that i must protect the romex with guard strips or bore holes 1 25 from the face of the joists when running perpendicular to the joists and when i run parallel i must staple the romex to the face of the joists.
To run the wires inside rigid conduit you ll need a hacksaw a pipe bender capable of bending 1 2 in.
If there is access above the light in an attic or kneewall space you can remove the wire from the existing fixture box and install it in a junction box.
A pull down attic ladder does not count.
Yes this should be corrected and it would be good to have the wiring and all the circuit connections inspected as well.
Running wires inside rigid conduit.
As long as it passes inspection there s no code violation concerns for diyers handling their own wiring.
This is a code violation in most places.