Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] mariadb "operation not permitted" error while installing
@ 2021-05-16 14:33 dashezup
  2021-05-17  4:30 ` Veganizer
  2021-05-29 19:17 ` [ISSUE] [CLOSED] " Johnnynator
  0 siblings, 2 replies; 3+ messages in thread
From: dashezup @ 2021-05-16 14:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2200 bytes --]

New issue by dashezup on void-packages repository

https://github.com/void-linux/void-packages/issues/30932

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname:  
  `Void 5.11.12_1 x86_64 GenuineIntel notuptodate FFFFF`
* package:  
  `mariadb-10.5.9_1`

### Expected behavior

install mariadb without showing errors.

### Actual behavior

shows this error because the INSTALL script runs `mysql_install_db` with mysql user which runs `chown`

```
chown: changing ownership of '/usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool': Operation not permitted
Couldn't set an owner to '/usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool'.
It must be root, the PAM authentication plugin doesn't work otherwise..

chown: changing ownership of '/usr/lib/mysql/plugin/auth_pam_tool_dir': Operation not permitted
Cannot change ownership of the '/usr/lib/mysql/plugin/auth_pam_tool_dir' directory
to the 'mysql' user. Check that you have the necessary permissions and try again.
```

### Steps to reproduce the behavior

`xbps-install mariadb`


### Solutions

1. run `mysql_install_db` with root instead of mysql in INSTALL script, it would be like this https://github.com/dashezup/void-packages/commit/4689aa1a92b8e3361213a93386075a4a0ed05ca5
   btw I'm a bit confused about the `UPDATE` variable for INSTALL script
> $UPDATE: set to yes if package is being upgraded, no if package is being installed or removed.

so how did it not being triggered when the package was "removed"? (I know it shouldn't)
2. not run `mysql_install_db` at all. may mention the command in INSTALL.msg, and may include one for update as well just like what [the arch linux package do](https://github.com/archlinux/svntogit-packages/blob/packages/mariadb/trunk/mariadb.install)
3. `chown mysql:mysql /usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool /usr/lib/mysql/plugin/auth_pam_tool_dir` in post_install() or somewhere else, so that the mysql user will be able to chown for that two files.

@Veganizer hey check this

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mariadb "operation not permitted" error while installing
  2021-05-16 14:33 [ISSUE] mariadb "operation not permitted" error while installing dashezup
@ 2021-05-17  4:30 ` Veganizer
  2021-05-29 19:17 ` [ISSUE] [CLOSED] " Johnnynator
  1 sibling, 0 replies; 3+ messages in thread
From: Veganizer @ 2021-05-17  4:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

New comment by Veganizer on void-packages repository

https://github.com/void-linux/void-packages/issues/30932#issuecomment-841975777

Comment:
Hey dashezup,

thank you for this bug report with options for solutions.

I hadn't this bug in my installations but I think your solution sounds reasonable.
@Johnnynator what do you mean?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ISSUE] [CLOSED] mariadb "operation not permitted" error while installing
  2021-05-16 14:33 [ISSUE] mariadb "operation not permitted" error while installing dashezup
  2021-05-17  4:30 ` Veganizer
@ 2021-05-29 19:17 ` Johnnynator
  1 sibling, 0 replies; 3+ messages in thread
From: Johnnynator @ 2021-05-29 19:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2267 bytes --]

Closed issue by dashezup on void-packages repository

https://github.com/void-linux/void-packages/issues/30932

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname:  
  `Void 5.11.12_1 x86_64 GenuineIntel notuptodate FFFFF`
* package:  
  `mariadb-10.5.9_1`

### Expected behavior

install mariadb without showing errors.

### Actual behavior

shows this error because the INSTALL script runs `mysql_install_db` with mysql user which runs `chown`

```
chown: changing ownership of '/usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool': Operation not permitted
Couldn't set an owner to '/usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool'.
It must be root, the PAM authentication plugin doesn't work otherwise..

chown: changing ownership of '/usr/lib/mysql/plugin/auth_pam_tool_dir': Operation not permitted
Cannot change ownership of the '/usr/lib/mysql/plugin/auth_pam_tool_dir' directory
to the 'mysql' user. Check that you have the necessary permissions and try again.
```

### Steps to reproduce the behavior

`xbps-install mariadb`


### Solutions

The following are solutions I can think of to solve this

1. run `mysql_install_db` with root instead of mysql in INSTALL script, it would be like this https://github.com/dashezup/void-packages/commit/4689aa1a92b8e3361213a93386075a4a0ed05ca5
   btw I'm a bit confused about the `UPDATE` variable for INSTALL script
> $UPDATE: set to yes if package is being upgraded, no if package is being installed or removed.

so how did it not being triggered when the package was "removed"? (I know it shouldn't)

2. not run `mysql_install_db` at all. may mention the command in INSTALL.msg, and may include one for update as well just like what [the arch linux package do](https://github.com/archlinux/svntogit-packages/blob/packages/mariadb/trunk/mariadb.install)

3. `chown mysql:mysql /usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool /usr/lib/mysql/plugin/auth_pam_tool_dir` in post_install() or somewhere else, so that the mysql user will be able to chown for that two files.

@Veganizer hey check this

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-29 19:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-16 14:33 [ISSUE] mariadb "operation not permitted" error while installing dashezup
2021-05-17  4:30 ` Veganizer
2021-05-29 19:17 ` [ISSUE] [CLOSED] " Johnnynator

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).