swizzin / swizzin

A simple, modular seedbox solution
https://swizzin.ltd
GNU General Public License v3.0
2.11k stars 319 forks source link

[BUG] box update - cannot open .git/FETCH_HEAD: Permission denied #874

Closed SG133 closed 2 years ago

SG133 commented 2 years ago

What happened?

Steps to reproduce:

  1. run box update as root
  2. Error : cannot open .git/FETCH_HEAD: Permission denied

Expected results:

Swizzin commit

e3a0fc6

What OS are you using?

Ubuntu 20.04 (Focal)

What architecture is your OS?

amd64

Relevant logs and output

root@PAR-251236:~# box update
...     Updating swizzin local repository
        ✔   Local repository updated using: master
INFO    HEAD is now set to e3a0fc6
...     Setting correct permissions on swizzin files
        ✔   Permissions set
...     Updating panel to latest version
...     Pulling new commits
        ✔   Commits pulled
...     Checking pip for new depends
        ✔   Depends up-to-date
...     Restarting Panel
        ✔   Done!
        ✔   Done
error: cannot open .git/FETCH_HEAD: Permission denied
liaralabs commented 2 years ago

Do you have actual logs? Installed packages?

That this is happening after the panel script means there is nothing in the stdout providing any clues to the source of the issue.

SG133 commented 2 years ago

Hello, It's just a default install on ubuntu 20.04.

For the packages installed :

nginx panel rtorrent rutorrent vsftpd

And the logs below :

[Thu May 26 17:53:00] LOG >>>> box update [Thu May 26 17:53:01] LOG git @ e3a0fc6 2>&1 [Thu May 26 17:53:01] LOG OS supported [Thu May 26 17:53:01] LOG noupdate = [Thu May 26 17:53:01] ... Updating swizzin local repository Already on 'master' Your branch is up to date with 'origin/master'. Fetching origin HEAD is now at e3a0fc6 meta: last minute changelog [Thu May 26 17:53:01] ✔ Local repository updated using: master [Thu May 26 17:53:01] INFO HEAD is now set to e3a0fc6 [Thu May 26 17:53:01] LOG Re-sourcing globals.sh [Thu May 26 17:53:01] ... Setting correct permissions on swizzin files [Thu May 26 17:53:02] ✔ Permissions set [Thu May 26 17:53:02] LOG List of keys stored under directory "" c2221fbd-67d5-4302-927f-3105617a4fab [Thu May 26 17:53:02] LOG Inserted apt logcheck marker [Thu May 26 17:53:02] LOG Variables unset [Thu May 26 17:53:02] LOG New variables exported [Thu May 26 17:53:03] LOG Setting key "bash_completion/apps.list" to "airsonic.sh autobrr.sh autodl.sh bazarr.sh btsync.sh calibrecs.sh calibre.sh calibreweb.sh deluge.sh duckdns.sh emby.sh ffmpeg.sh filebrowser.sh flood.sh jackett.sh jellyfin.sh letsencrypt.sh librespeed.sh lidarr.sh lounge.sh mango.sh medusa.sh mylar.sh navidrome.sh netdata.sh nextcloud.sh nginx.sh nzbget.sh nzbhydra.sh ombi.sh organizr.sh panel.sh plex.sh prowlarr.sh pyload.sh qbittorrent.sh quassel.sh quota.sh radarr.sh rapidleech.sh rclone.sh readarr.sh rtorrent.sh rutorrent.sh sabnzbd.sh shellinabox.sh sickchill.sh sickgear.sh sonarr.sh syncthing.sh tautulli.sh transmission.sh vsftpd.sh webmin.sh wireguard.sh x2go.sh xmrig.sh znc.sh" [Thu May 26 17:53:03] LOG Setting key "bash_completion/upgrade.list" to "airsonic.sh autobrr.sh autodl.sh calibre.sh curl.sh deluge.sh emby.sh filebrowser.sh flood.sh lounge.sh mango.sh mylar.sh navidrome.sh nginx.sh nzbhydra.sh ombi.sh panel.sh plex.sh qbittorrent.sh rtorrent.sh rutorrent.sh sabnzbd.sh sonarr.sh" [Thu May 26 17:53:03] LOG List of keys stored under directory "bash_completion" [Thu May 26 17:53:03] LOG Path of file for key "bash_completion/apps.list" is "/var/lib/swizzin/db/bash_completion/apps.list" [Thu May 26 17:53:03] LOG Path of file for key "bash_completion/upgrade.list" is "/var/lib/swizzin/db/bash_completion/upgrade.list" [Thu May 26 17:53:04] LOG Restarting php7.4-fpm.service [Thu May 26 17:53:05] ... Updating panel to latest version [Thu May 26 17:53:05] ... Pulling new commits Already up to date. [Thu May 26 17:53:05] ✔ Commits pulled [Thu May 26 17:53:05] ... Checking pip for new depends [Thu May 26 17:53:07] ✔ Depends up-to-date [Thu May 26 17:53:07] ... Restarting Panel [Thu May 26 17:53:07] ✔ Done! [Thu May 26 17:53:07] ✔ Done (END)

SG133 commented 2 years ago

More logs :

May 26 17:53:04 PAR-251236 systemd[1]: Stopping The PHP 7.4 FastCGI Process Manager... -- Subject: A stop job for unit php7.4-fpm.service has begun execution -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- A stop job for unit php7.4-fpm.service has begun execution.

-- The job identifier is 51088. May 26 17:53:04 PAR-251236 systemd[1]: php7.4-fpm.service: Succeeded. -- Subject: Unit succeeded -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- The unit php7.4-fpm.service has successfully entered the 'dead' state. May 26 17:53:04 PAR-251236 systemd[1]: Stopped The PHP 7.4 FastCGI Process Manager. -- Subject: A stop job for unit php7.4-fpm.service has finished -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- A stop job for unit php7.4-fpm.service has finished.

-- The job identifier is 51088 and the job result is done. May 26 17:53:04 PAR-251236 systemd[1]: Starting The PHP 7.4 FastCGI Process Manager... -- Subject: A start job for unit php7.4-fpm.service has begun execution -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- A start job for unit php7.4-fpm.service has begun execution.

-- The job identifier is 51088. May 26 17:53:04 PAR-251236 systemd[1]: Started The PHP 7.4 FastCGI Process Manager. -- Subject: A start job for unit php7.4-fpm.service has finished successfully -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- A start job for unit php7.4-fpm.service has finished successfully.

-- The job identifier is 51088. May 26 17:53:04 PAR-251236 systemd[1]: Reloading A high performance web server and a reverse proxy server. -- Subject: A reload job for unit nginx.service has begun execution -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- A reload job for unit nginx.service has begun execution.

-- The job identifier is 51163. May 26 17:53:04 PAR-251236 nginx[575958]: nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate "/etc/ssl/certs/ssl-cert-snakeoil.pem" May 26 17:53:04 PAR-251236 systemd[1]: Reloaded A high performance web server and a reverse proxy server. -- Subject: A reload job for unit nginx.service has finished -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- A reload job for unit nginx.service has finished.

-- The job identifier is 51163 and the job result is done. May 26 17:53:05 PAR-251236 sudo[575999]: root : TTY=pts/3 ; PWD=/root ; USER=swizzin ; COMMAND=/usr/bin/git -C /opt/swizzin pull May 26 17:53:05 PAR-251236 sudo[575999]: pam_unix(sudo:session): session opened for user swizzin by sebastien(uid=0) May 26 17:53:05 PAR-251236 sudo[575999]: pam_unix(sudo:session): session closed for user swizzin May 26 17:53:07 PAR-251236 systemd[1]: Stopping swizzin panel service... -- Subject: A stop job for unit panel.service has begun execution -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- A stop job for unit panel.service has begun execution.

-- The job identifier is 51164. May 26 17:53:07 PAR-251236 systemd[1]: panel.service: Succeeded. -- Subject: Unit succeeded -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- The unit panel.service has successfully entered the 'dead' state. May 26 17:53:07 PAR-251236 systemd[1]: Stopped swizzin panel service. -- Subject: A stop job for unit panel.service has finished -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- A stop job for unit panel.service has finished.

-- The job identifier is 51164 and the job result is done. May 26 17:53:07 PAR-251236 systemd[1]: Started swizzin panel service. -- Subject: A start job for unit panel.service has finished successfully -- Defined-By: systemd -- Support: http://www.ubuntu.com/support

-- A start job for unit panel.service has finished successfully.

-- The job identifier is 51164. May 26 17:53:07 PAR-251236 sudo[576122]: root : TTY=pts/3 ; PWD=/root ; USER=www-data ; COMMAND=/usr/bin/git -C /srv/rutorrent/plugins/theme/themes/club-QuickBox fetch May 26 17:53:07 PAR-251236 sudo[576122]: pam_unix(sudo:session): session opened for user www-data by sebastien(uid=0) May 26 17:53:07 PAR-251236 sudo[576122]: pam_unix(sudo:session): session closed for user www-data May 26 17:53:07 PAR-251236 sudo[576125]: root : TTY=pts/3 ; PWD=/root ; USER=www-data ; COMMAND=/usr/bin/git -C /srv/rutorrent/plugins/theme/themes/club-QuickBox rev-parse HEAD May 26 17:53:07 PAR-251236 sudo[576125]: pam_unix(sudo:session): session opened for user www-data by sebastien(uid=0) May 26 17:53:07 PAR-251236 sudo[576125]: pam_unix(sudo:session): session closed for user www-data May 26 17:53:07 PAR-251236 sudo[576127]: root : TTY=pts/3 ; PWD=/root ; USER=www-data ; COMMAND=/usr/bin/git -C /srv/rutorrent/plugins/theme/themes/club-QuickBox rev-parse @{u} May 26 17:53:07 PAR-251236 sudo[576127]: pam_unix(sudo:session): session opened for user www-data by sebastien(uid=0) May 26 17:53:07 PAR-251236 sudo[576127]: pam_unix(sudo:session): session closed for user www-data

SG133 commented 2 years ago

And last one :

May 26 17:53:04 sd-97385 systemd[1]: Stopping The PHP 7.4 FastCGI Process Manager... May 26 17:53:04 sd-97385 systemd[1]: php7.4-fpm.service: Succeeded. May 26 17:53:04 sd-97385 systemd[1]: Stopped The PHP 7.4 FastCGI Process Manager. May 26 17:53:04 sd-97385 systemd[1]: Starting The PHP 7.4 FastCGI Process Manager... May 26 17:53:04 sd-97385 systemd[1]: Started The PHP 7.4 FastCGI Process Manager. May 26 17:53:04 sd-97385 systemd[1]: Reloading A high performance web server and a reverse proxy server. May 26 17:53:04 sd-97385 nginx[575958]: nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate "/etc/ssl/certs/ssl-cert-snakeoil.pem" May 26 17:53:04 sd-97385 systemd[1]: Reloaded A high performance web server and a reverse proxy server. May 26 17:53:07 sd-97385 systemd[1]: Stopping swizzin panel service... May 26 17:53:07 sd-97385 systemd[1]: panel.service: Succeeded. May 26 17:53:07 sd-97385 systemd[1]: Stopped swizzin panel service. May 26 17:53:07 sd-97385 systemd[1]: Started swizzin panel service.

liaralabs commented 2 years ago

Can you try a

find /srv/rutorrent -user root

And let me know if returns anything? I suspect it may be related to the club-quickbox theme.

SG133 commented 2 years ago

Result:

root@PAR-251236:~# find /srv/rutorrent -user root /srv/rutorrent/plugins/theme/themes/club-QuickBox/.git/FETCH_HEAD

liaralabs commented 2 years ago

This should be fixed -- can you try a box update and let me know if you still get the error?

SG133 commented 2 years ago

It's fixed. No more error message after box update Thanks !