Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the eeprom cache permissions to 755 #546

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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

Copy link

linux-foundation-easycla bot commented Feb 21, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

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

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

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

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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