looks like the entire directory /usr/lib/mysql/plugin
has no permission at all. Can you try following
chmod 755 /usr/lib/mysql/plugin
and to verify
ls -la /usr/lib/mysql/plugin
looks like the entire directory /usr/lib/mysql/plugin
has no permission at all. Can you try following
chmod 755 /usr/lib/mysql/plugin
and to verify
ls -la /usr/lib/mysql/plugin
I cant
It says:
root@DietPi:/home/dietpi# chmod 755 /usr/lib/mysql/plugin
chmod: changing permissions of '/usr/lib/mysql/plugin': Operation not permitted
hmm the file system is located on your SD card?
cd /usr/lib/mysql/
df -h .
lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
Yes
root@DietPi:/home/dietpi# cd /usr/lib/mysql/
root@DietPi:/usr/lib/mysql# df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 4.1G 9.9G 30% /
root@DietPi:/usr/lib/mysql# lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
NAME FSTYPE LABEL SIZE RO TYPE MOUNTPOINT PARTUUID UUID
sda 4.5T 0 disk
└─sda1
exfat Elements
4.5T 0 part /mnt/eleme 7faf86ab-ebd4-4c2e-8458-5e6f16fed8b1 199F-9A40
mmcblk0
│ 14.8G 0 disk
├─mmcblk0p1
│ vfat 128M 0 part /boot cf52adf2-01 F74C-FD2A
└─mmcblk0p2
ext4 14.7G 0 part / cf52adf2-02 dc8f5330-118c-4851-8099-f82529cccce9
ok file system type is correct. Might be some issues with the SD card. Maybe file system corruption
can you try following
sudo chmod 755 /usr/lib/mysql/plugin
if this is still failing, let’s setup a file system check
> /forcefsck
reboot
# then after reboot
sudo chmod 755 /usr/lib/mysql/plugin
root@DietPi:/home/dietpi# sudo chmod 755 /usr/lib/mysql/plugin
chmod: changing permissions of '/usr/lib/mysql/plugin': Operation not permitted
After typing
/forcefsck
reboot
Wondering a little bit on this. You are logged in as user root
. But somehow you are located at home folder of user dietpi
. How do you login as user root
? Or do you login as user dietpi
and switch to user root
afterwards?
Probably an immutable bit found its way onto that dir, the same turn the mode changed to 000, e.g. as a result of some metadata corruption. Can you check:
lsattr /usr/lib/mysql/plugin
And if ot shows an i
, then
chattr -i /usr/lib/mysql/plugin
chmod 0755 /usr/lib/mysql/plugin
I log as dietpi or as root, the results are the same…
If I do this:
root@DietPi:~# sudo chmod 755 /usr/lib/mysql/plugin
chmod: changing permissions of '/usr/lib/mysql/plugin': Operation not permitted
root@DietPi:~# lsattr /usr/lib/mysql/plugin
--------------e------- /usr/lib/mysql/plugin/ha_federated.so
--------------e------- /usr/lib/mysql/plugin/ha_federatedx.so
--------------e------- /usr/lib/mysql/plugin/query_response_time.so
--------------e------- /usr/lib/mysql/plugin/ha_blackhole.so
--------------e------- /usr/lib/mysql/plugin/query_cache_info.so
--------------e------- /usr/lib/mysql/plugin/sql_errlog.so
--------------e------- /usr/lib/mysql/plugin/metadata_lock_info.so
--------------e------- /usr/lib/mysql/plugin/type_mysql_json.so
--------------e------- /usr/lib/mysql/plugin/handlersocket.so
--------------e------- /usr/lib/mysql/plugin/auth_pam_tool_dir
--------------e------- /usr/lib/mysql/plugin/wsrep_info.so
--------------e------- /usr/lib/mysql/plugin/disks.so
--------------e------- /usr/lib/mysql/plugin/server_audit.so
--------------e------- /usr/lib/mysql/plugin/auth_pam.so
--------------e------- /usr/lib/mysql/plugin/file_key_management.so
--------------e------- /usr/lib/mysql/plugin/auth_ed25519.so
--------------e------- /usr/lib/mysql/plugin/locales.so
--------------e------- /usr/lib/mysql/plugin/auth_pam_v1.so
--------------e------- /usr/lib/mysql/plugin/simple_password_check.so
--------------e------- /usr/lib/mysql/plugin/ha_sphinx.so
--------------e------- /usr/lib/mysql/plugin/ha_archive.so
Then I obtain a different message when trying to update:
┌─────────────────────────────┤ DietPi-Update ├─────────────────────────────┐
│ Installing new DietPi system files │
│ - Command: cp -a DietPi-master/rootfs/. / │
│ - Exit code: 1 │
│ - DietPi version: v8.11.2 (MichaIng/master) | HW_MODEL: 4 | HW_ARCH: 2 | │
│ DISTRO: 6 │
│ - Image creator: DietPi Core Team │
│ - Pre-image: from scratch │
│ - Error log: │
│ cp: cannot create regular file '/./etc/cron.hourly/dietpi': Operation not │ permitted ││ │
│ Retry : Re-run the last command that failed │
│ DietPi-Config : Edit network, APT/NTP mirror settings etc │
│ Open subshell : Open a subshell to investigate or solve the issue │
│ Send report : Uploads bugreport containing system info to DietPi │
│ ●─ Devs only ──────────────────────────────────────● │
│ Change command : Adjust and rerun the command │
│ │
│ │
│ <Ok> <Exit> │
│ │
└───────────────────────────────────────────────────────────────────────────┘
Looks your issue is growing as other files/folder impacted as well now. Probably SD card is giving up slowly.
Ah, by default lsattr
lists attributes for files within dirs, instead of the dir itself. This should do it:
lsattr -d /usr/lib/mysql/plugin
However, if now other files are affected as well, there seems to be something more serious borken or breaking, I agree with Joulinar. Still no kernel errors?
dmesg -l 0,1,2,3
ls -l /etc/cron.hourly/dietpi
lsattr /etc/cron.hourly/dietpi
This is what I obtained
root@DietPi:/# dmesg -l 0,1,2,3
[ 0.621247] bcm2708_fb soc:fb: Unable to determine number of FBs. Disabling driver.
[ 4.555824] sd 0:0:0:0: [sda] No Caching mode page found
[ 4.555841] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 12.037075] exFAT-fs (sda1): bogus allocation bitmap size(need : 4769126, cur : 4769127)
root@DietPi:/#
root@DietPi:/#
root@DietPi:/# ls -l /etc/cron.hourly/dietpi
---------- 1 root root 1311 Nov 19 23:58 /etc/cron.hourly/dietpi
root@DietPi:/# lsattr /etc/cron.hourly/dietpi
----i---------e------- /etc/cron.hourly/dietpi
There we have the immutable flag. Try this:
chattr -i /etc/cron.hourly/dietpi
chattr -d -i /usr/lib/mysql/plugin
chmod 0755 /etc/cron.hourly/dietpi /usr/lib/mysql/plugin
Solved, thanks VERY much
Keep an eye on your SD card. Looking all kinds of file system permission is quite unusual.