Explanation/Reference:
Explanation:
Port Security and Port Types
You can configure port security only on Layer 2 interfaces. Details about port security and different types of interfaces or ports are as follows:
Access ports - You can configure port security on interfaces that you have configured as Layer 2

access ports. On an access port, port security applies only to the access VLAN.
Trunk ports - You can configure port security on interfaces that you have configured as Layer 2 trunk

ports. VLAN maximums are not useful for access ports. The device allows VLAN maximums only for VLANs associated with the trunk port.
SPAN ports - You can configure port security on SPAN source ports but not on SPAN destination

ports.
Ethernet Port Channels - Port security is not supported on Ethernet port channels.

Reference: http://www.cisco.com/c/en/us/td/docs/switches/datacenter/sw/4_1/nx-os/security/configuration/ guide/sec_nx-os-cfg/sec_portsec.html
These are some other guidelines for configuring port security:
Port security can only be configured on static access ports. A secure port cannot be a dynamic access port or a trunk port. A secure port cannot be a destination port for Switch Port Analyzer (SPAN). A secure port cannot belong to an EtherChannel port group. A secure port cannot be an 802.1X port. You cannot configure static secure MAC addresses in the voice VLAN.
Reference: https://supportforums.cisco.com/t5/network-infrastructure-documents/unable-to-configure-port- security-on-a-catalyst-2940-2950-2955/ta-p/3133064