linuxserver / docker-tvheadend

GNU General Public License v3.0
158 stars 87 forks source link

[BUG] spawn: tar: can't open './.ash_history': Permission denied #220

Closed hammelkopp closed 1 year ago

hammelkopp commented 1 year ago

Is there an existing issue for this?

Current Behavior

The server is not coming up again after upgrading to the latest version.

Expected Behavior

No response

Steps To Reproduce

  1. TVHeadend was updated to latest release

Environment

- OS: Unraid 6.11.5
- How docker service was installed: via Unraid OS

CPU architecture

x86-64

Docker creation

Container is created via Unraid

Container logs

2023-03-09 22:49:20.821 [   INFO] main: Log started
2023-03-09 22:49:20.821 [   INFO] http: Starting HTTP server 0.0.0.0:9981
2023-03-09 22:49:20.821 [   INFO] htsp: Starting HTSP server 0.0.0.0:9982
2023-03-09 22:49:20.848 [   INFO] config: backup: migrating config from 4.3-2100~gd1366a066 (running 4.3-2101~g39df64bb8)
2023-03-09 22:49:20.848 [   INFO] config: backup: running, output file /config/backup/4.3-2100~gd1366a066.tar.bz2
2023-03-09 22:49:20.850 [   INFO] spawn: Executing "/bin/tar"
2023-03-09 22:49:21.133 [  ERROR] spawn: tar: can't open './.ash_history': Permission denied
2023-03-09 22:49:21.133 [  ERROR] spawn: tar: error exit delayed from previous errors
2023-03-09 22:49:21.271 [   INFO] config: backup: completed
2023-03-09 22:49:21.271 [  ERROR] config: command '/bin/tar cjf /config/backup/4.3-2100~gd1366a066.tar.bz2 --exclude backup --exclude epggrab/*.sock --exclude timeshift/buffer --exclude imagecache/meta --exclude imagecache/data .' returned error code 1
2023-03-09 22:49:21.271 [  ERROR] config: executed in directory '/config'
2023-03-09 22:49:21.271 [  ERROR] config: please DON'T report this as an error, you may use --nobackup to skip
2023-03-09 22:49:21.271 [  ERROR] config: ... or run the above command in the printed directory
2023-03-09 22:49:21.271 [  ERROR] config: ... using the same user/group as for the Tvheadend executable
2023-03-09 22:49:21.271 [  ERROR] config: ... to check the reason for the unfinished backup
2023-03-09 22:49:21.271 [  ERROR] config: backup: fatal error
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

hammelkopp commented 1 year ago

root@nas:~# docker inspect a687da8484b1 [ { "Id": "a687da8484b1e0ca5ee061935ad6b9e437f95c6b73da30c31c64f0542d4a6232", "Created": "2023-03-09T20:31:16.947243487Z", "Path": "/init", "Args": [], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 10345, "ExitCode": 0, "Error": "", "StartedAt": "2023-03-09T21:41:56.543095703Z", "FinishedAt": "2023-03-09T21:41:49.435666263Z" }, "Image": "sha256:f73ae6ec0259e9b85a0e3a64886265903ff02b0526ec5f50926440a7a5362116", "ResolvConfPath": "/var/lib/docker/containers/a687da8484b1e0ca5ee061935ad6b9e437f95c6b73da30c31c64f0542d4a6232/resolv.conf", "HostnamePath": "/var/lib/docker/containers/a687da8484b1e0ca5ee061935ad6b9e437f95c6b73da30c31c64f0542d4a6232/hostname", "HostsPath": "/var/lib/docker/containers/a687da8484b1e0ca5ee061935ad6b9e437f95c6b73da30c31c64f0542d4a6232/hosts", "LogPath": "/var/lib/docker/containers/a687da8484b1e0ca5ee061935ad6b9e437f95c6b73da30c31c64f0542d4a6232/a687da8484b1e0ca5ee061935ad6b9e437f95c6b73da30c31c64f0542d4a6232-json.log", "Name": "/tvheadend", "RestartCount": 0, "Driver": "btrfs", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": [ "ea3c03c7659fd989ba676c05367fb0fae0ecfebfc0b91153bb0ff882a5611223" ], "HostConfig": { "Binds": [ "/mnt/disks/apps/appdata/tvheadend:/config:rw,slave", "/mnt/user/nas/Serien:/recordings:rw,slave" ], "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": { "max-file": "1", "max-size": "50m" } }, "NetworkMode": "br0", "PortBindings": {}, "RestartPolicy": { "Name": "no", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": null, "CapDrop": null, "CgroupnsMode": "host", "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": null, "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": [], "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [ { "PathOnHost": "/dev/dvb", "PathInContainer": "/dev/dvb", "CgroupPermissions": "rwm" } ], "DeviceCgroupRules": null, "DeviceRequests": null, "KernelMemory": 0, "KernelMemoryTCP": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": false, "PidsLimit": null, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0, "MaskedPaths": [ "/proc/asound", "/proc/acpi", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/proc/scsi", "/sys/firmware" ], "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ] }, "GraphDriver": { "Data": null, "Name": "btrfs" }, "Mounts": [ { "Type": "bind", "Source": "/mnt/disks/apps/appdata/tvheadend", "Destination": "/config", "Mode": "rw,slave", "RW": true, "Propagation": "slave" }, { "Type": "bind", "Source": "/mnt/user/nas/Serien", "Destination": "/recordings", "Mode": "rw,slave", "RW": true, "Propagation": "slave" } ], "Config": { "Hostname": "a687da8484b1", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "9981/tcp": {}, "9982/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "TZ=Europe/Berlin", "HOST_OS=Unraid", "HOST_HOSTNAME=nas", "HOST_CONTAINERNAME=tvheadend", "PGID=100", "PUID=99", "TCP_PORT_9981=80", "TCP_PORT_9982=9982", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "PS1=$(whoami)@$(hostname):$(pwd)\$ ", "HOME=/config", "TERM=xterm", "S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0", "S6_VERBOSITY=1", "S6_STAGE2_HOOK=/docker-mods", "LSIO_FIRST_PARTY=true" ], "Cmd": null, "Image": "linuxserver/tvheadend", "Volumes": { "/config": {} }, "WorkingDir": "/", "Entrypoint": [ "/init" ], "OnBuild": null, "Labels": { "build_version": "Linuxserver.io version:- 39df64bb-ls154 Build-date:- 2023-03-05T16:12:51+01:00", "maintainer": "saarg", "net.unraid.docker.icon": "http://i.imgur.com/zGSUAT4.png", "net.unraid.docker.managed": "dockerman", "net.unraid.docker.webui": "http://[IP]:[PORT:9981]/", "org.opencontainers.image.authors": "linuxserver.io", "org.opencontainers.image.created": "2023-03-05T16:12:51+01:00", "org.opencontainers.image.description": "Tvheadend works as a proxy server: is a TV streaming server and recorder for Linux, FreeBSD and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT>IP and HDHomeRun as input sources. Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming. Multiple EPG sources are supported (over-the-air DVB and ATSC including OpenTV DVB extensions, XMLTV, PyXML). ", "org.opencontainers.image.documentation": "https://docs.linuxserver.io/images/docker-tvheadend", "org.opencontainers.image.licenses": "GPL-3.0-only", "org.opencontainers.image.ref.name": "251f0dc45cbb4bb06f66f3b28232763c405fef16", "org.opencontainers.image.revision": "251f0dc45cbb4bb06f66f3b28232763c405fef16", "org.opencontainers.image.source": "https://github.com/linuxserver/docker-tvheadend", "org.opencontainers.image.title": "Tvheadend", "org.opencontainers.image.url": "https://github.com/linuxserver/docker-tvheadend/packages", "org.opencontainers.image.vendor": "linuxserver.io", "org.opencontainers.image.version": "39df64bb-ls154" } }, "NetworkSettings": { "Bridge": "", "SandboxID": "fbb8ae545d56470105002687869d718ce5e7595ab5a5b0800c07e603e4e87870", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "/var/run/docker/netns/fbb8ae545d56", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "br0": { "IPAMConfig": { "IPv4Address": "192.168.2.30" }, "Links": null, "Aliases": [ "a687da8484b1" ], "NetworkID": "749281e8cf4948e6459249f0d8dd4f269e227663eb84c8a7c2028c9c3b2fa463", "EndpointID": "4c3ba46df3157c6897534b5632eaac29b972c5d2a995ecc91e5c2ac554dc0791", "Gateway": "192.168.2.1", "IPAddress": "192.168.2.30", "IPPrefixLen": 24, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:c0:a8:02:1e", "DriverOpts": null } } } } ]

hammelkopp commented 1 year ago

root@a687da8484b1:/config# ls -la total 808 drwxrwxrwx 17 abc abc 300 Mar 9 23:21 . drwxr-xr-x 1 root root 274 Mar 9 21:31 .. -rw------- 1 root root 1010 Mar 9 23:21 .ash_history -rw-r--r-- 1 abc abc 22 Mar 9 23:21 .lock drwxr-xr-x 2 abc abc 6 Feb 7 2021 .xmltv drwx------ 2 abc abc 126 Oct 22 2021 accesscontrol drwx------ 2 abc abc 4096 Mar 9 23:07 backup drwx------ 2 abc abc 4096 Dec 24 02:06 bouquet drwx------ 2 abc abc 46 Feb 7 2021 caclient drwx------ 4 abc abc 31 Oct 14 2021 channel drwx------ 2 abc abc 166 Oct 22 2021 codec drwxr-xr-x 2 abc abc 25 Feb 7 2021 comskip -rw------- 1 abc abc 1647 Mar 9 23:21 config drwxr-xr-x 5 abc abc 46 Oct 22 2021 dvr -rw------- 1 abc abc 798765 Mar 9 23:21 epgdb.v3 drwx------ 3 abc abc 20 Oct 14 2021 epggrab drwx------ 3 abc abc 18 Aug 6 2021 imagecache drwx------ 5 abc abc 45 Sep 23 2021 input drwx------ 2 abc abc 86 Aug 20 2021 passwd drwx------ 2 abc abc 286 Feb 7 2021 profile drwx------ 2 abc abc 20 Oct 14 2021 service_mapper

After

root@a687da8484b1:/config# chmod 777 .ash_history

it´s working again.

hammelkopp commented 1 year ago

09.03.2023 22:55:32 github-actions[bot] @.***>:

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

— Reply to this email directly, view it on GitHub[https://github.com/linuxserver/docker-tvheadend/issues/220#issuecomment-1462877672], or unsubscribe[https://github.com/notifications/unsubscribe-auth/A3IFVSSMHMS5SAC4J63J23DW3JGU3ANCNFSM6AAAAAAVVVH2YU]. You are receiving this because you authored the thread.[Verfolgungsbild][https://github.com/notifications/beacon/A3IFVSUDW3YN267IMNHO3W3W3JGU3A5CNFSM6AAAAAAVVVH2YWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSXGG66Q.gif]

M0dj0 commented 1 year ago

I have exactly the same problem. It appears from the update from 02987438-ls151 to d1366a06-ls152 for the first time. Newer versions also can not be updated.

j0nnymoe commented 1 year ago

Did you try chmod 777 .ash_history ?

nomandera commented 1 year ago

chmod 777 ./.bash_history

seems to have worked for me as an interim fix. notice bash not ash.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 11 months ago

This issue is locked due to inactivity