Property owners have a duty to provide reasonably safe premises to anyone invited to enter. If the property is open to the public, then the owners owe a duty to anyone who lawfully enters the property (ex. uses the bathroom).
If it is a private premise, then the owners owe a duty to anyone entering to bestow a benefit upon the owner (ex. deliveries, repairs, meter readings). Even if a property owner did not actually know about the dangerous condition, he or she may still be responsible for your injures because a landowner must reasonably inspect the premises to discover and repair latent dangerous conditions, or warn those who are coming onto the property. If the dangerous condition is open and obvious, then the landowner does not have a duty to warn but still has a responsibility to make the premises safe.
Even if the property owner delegates the responsibility to maintain the premises to someone else (ex. a property management company), he or she may still be held liable for your injuries. Even if you are partially responsible for your injuries, you may still be entitled to recover damages from the property owner. In New York, you have 3 years to begin a law suit due to a dangerous condition on property. If you are seeking to sue New York State, you only have two years to file the claim. If you are seeking to sue a municipality (e.x. town) or government agency, then you may need to file important legal documents within 90 days and commence a suit within one year thereafter.