The Arraigo social residence permit is suitable for nationals of non-UE countries who have been living for 2 years in Spain, are now staying in Spain without any legal permit and have a close relative (spouse, parent, or adult child) residing legally in Spain. This residence gives you the right to work in Spain as an employee or as a self-employed worker.
