Skip to content

Conversation

PJHsieh
Copy link

@PJHsieh PJHsieh commented Feb 21, 2025

Description

The issue arises because, after a system reboot, the permissions of /var/cache/sonic/decode-syseeprom/ or its file /var/cache/sonic/decode-syseeprom/syseeprom_cache may be incorrectly set. This misconfiguration can cause the Platform API to require root privileges for access.

This problem has been observed in various platforms, such as the AS7326_56X, where running show platform syseeprom results in errors due to permission issues.

Motivation and Context

To address this, it's essential to ensure that the cache directory and its files have the correct permissions set upon system startup. Implementing a fix that adjusts these permissions appropriately can prevent the Platform API from requiring root privileges, thereby resolving the issue.

How Has This Been Tested?

Reboot and use admin account to run show platform syseeprom.

Additional Information (Optional)

@mssonicbld
Copy link
Collaborator

/azp run

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 21, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Issue and Root Cause:
The issue arises because, after a system reboot, the permissions of /var/cache/sonic/decode-syseeprom/ or its file
/var/cache/sonic/decode-syseeprom/syseeprom_cache may be incorrectly set. This misconfiguration can cause the
Platform API to require root privileges for access.

This problem has been observed in various platforms, such as the AS7326_56X, where running show platform syseeprom
results in errors due to permission issues.

Solution:
To address this, it's essential to ensure that the cache directory and its files have the correct permissions set upon
system startup. Implementing a fix that adjusts these permissions appropriately can prevent the Platform API from
requiring root privileges, thereby resolving the issue.
@PJHsieh PJHsieh force-pushed the set_eeprom_cache_permissions_755 branch from f63ba73 to 75123c7 Compare February 21, 2025 02:23
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PJHsieh PJHsieh force-pushed the set_eeprom_cache_permissions_755 branch from c4d05e0 to fb93dae Compare February 21, 2025 06:15
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PJHsieh
Copy link
Author

PJHsieh commented Mar 21, 2025

@prgeor , please review this PR, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants