Skip to content

Files and folders owned by root on exit. #123

Description

@einarjon

After running the pyinstaller, both entrypoints fix the permissions by running
chown -R --reference=. ./dist/linux and chown -R --reference=. ./dist/windows
That's usually not enough, and it leaves files/folders with root ownership.

So I have to run
docker run -v $PWD/win:/src cdrx/pyinstaller-windows:python3 'chown -R --reference=/src /src'
to clean that up every time.

Proposed fix:
Change line 42 of the entrypoint files to
chown -R --reference=. ./dist ./__pycache__
https://github.com/cdrx/docker-pyinstaller/blob/master/entrypoint-linux.sh#L42
https://github.com/cdrx/docker-pyinstaller/blob/master/entrypoint-windows.sh#L42

Steps to reproduce:

$ docker run -v  $PWD/lin:/src   cdrx/pyinstaller-linux:python3 >& /dev/null
$ find lin -user  0  -exec ls -ld {} \;
drwxr-xr-x. 3 root root 4096 Nov 10 14:37 lin/dist
drwxr-xr-x. 2 root root 4096 Nov 10 14:37 lin/__pycache__
-rw-r--r--. 1 root root 3141 Nov 10 14:37 lin/__pycache__/myexecutable.cpython-37.pyc
$ docker run -v  $PWD/win:/src   cdrx/pyinstaller-windows:python3 >& /dev/null
$ find win -user  0  -exec ls -ld {} \;
drwxr-xr-x. 3 root root 4096 Nov 10 14:42 win/dist
drwxr-xr-x. 2 root root 4096 Nov 10 14:42 win/__pycache__
-rw-r--r--. 1 root root 3143 Nov 10 14:42 win/__pycache__/myexecutable.cpython-37.pyc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions