Set owner after restoring counters folder during warmboot (#13507) (#14435)

Why I did it
After warm reboot, show environment prints the following error:
failed to import plugin show.plugins.macsec: [Errno 13] Permission denied: '/tmp/cache/macsec'

How I did it
Set owner back to admin after restoring counters folder.

How to verify it
sudo warm-reboot, then ensure show environement does not print errors.

Signed-off-by: Oleksandr Kolomeiets <oleksandrx.kolomeiets@intel.com>
Co-authored-by: oleksandrx-kolomeiets <oleksandrx.kolomeiets@intel.com>
This commit is contained in:
mssonicbld 2023-03-28 05:57:26 +08:00 committed by GitHub
parent ea34c9971d
commit 16bbbd776a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,6 +130,7 @@ function restore_counters_folder()
cache_counters_folder="/host/counters"
if [[ -d $cache_counters_folder ]]; then
mv $cache_counters_folder /tmp/cache
chown -R admin:admin /tmp/cache
fi
}