Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

root is owner of files created by msconvert #11

Open
tczauderna opened this issue Jan 20, 2021 · 6 comments
Open

root is owner of files created by msconvert #11

tczauderna opened this issue Jan 20, 2021 · 6 comments

Comments

@tczauderna
Copy link

Hi,

I have pulled the image
docker pull chambm/pwiz-skyline-i-agree-to-the-vendor-licenses
and I basically run it like this
docker run -it --rm -e WINEDEBUG=-all -v /your/data:/data chambm/pwiz-skyline-i-agree-to-the-vendor-licenses wine msconvert /data/file.raw

It works beautifully, however, all files created by msconvert are owned by root.
Is this intended behaviour?
Can this be changed via parameters?

I have tried adding a user
--user "$(id -u):$(id -g)"
running
docker run -it --rm --user "$(id -u):$(id -g)" -e WINEDEBUG=-all -v /your/data:/data chambm/pwiz-skyline-i-agree-to-the-vendor-licenses wine msconvert /data/file.raw
but this causes an error
$WINEPREFIX is not owned by you

I have also tried to run wine_anyuser which doesn't cause the error from above
docker run -it --rm --user "$(id -u):$(id -g)" -e WINEDEBUG=-all -v /your/data:/data chambm/pwiz-skyline-i-agree-to-the-vendor-licenses wine_anyuser msconvert /data/file.raw
but then all files are owned by root as well.

Thanks!

@chambm
Copy link
Member

chambm commented Jan 20, 2021

If switching user with --user then use mywine instead of wine_anyuser. That will copy the WINEPREFIX and the output should be owned by the user.

@tczauderna
Copy link
Author

Thank you for looking into this!

I tried mywine but this causes a permission denied issue and some follow-up problems from the mywine script.

mkdir: cannot create directory '/mywineprefix': Permission denied
cp: target '/mywineprefix/' is not a directory
ln: failed to create symbolic link '/mywineprefix//dosdevices/c:': No such file or directory
ln: failed to create symbolic link '/mywineprefix//dosdevices/z:': No such file or directory
wine: chdir to /mywineprefix
 : No such file or directory

Then I changed mywine.sh line 4 from
MYWINEPREFIX=/mywineprefix/ to
MYWINEPREFIX=$(pwd)/mywineprefix/
which solved the permission denied issue but then msconvert didn't work.

@bobabooey
Copy link

Did you ever figure out how to solve this problem of root owning files created by msconvert?

@chambm
Copy link
Member

chambm commented Jul 26, 2024

Does this happen with mywine with the latest container version?

@bobabooey
Copy link

bobabooey commented Jul 29, 2024

I'm using the latest container version. I'm getting the same error tczauderna reported:

$ docker run -it --rm --user "$(id -u):$(id -g)" -e WINEDEBUG=-all -v "$(pwd)":/data chambm/pwiz-skyline-i-agree-to-the-vendor-licenses mywine msconvert --help
mkdir: cannot create directory '/mywineprefix': Permission denied
cp: target '/mywineprefix/' is not a directory
ln: failed to create symbolic link '/mywineprefix//dosdevices/c:': No such file or directory
ln: failed to create symbolic link '/mywineprefix//dosdevices/z:': No such file or directory

Note the same command works if I remove --user "$(id -u):$(id -g)" however any files created are owned by root which I'm trying to solve. Thanks.

@ryanjob42
Copy link

I believe the issue is that the folder /mywineprefix doesn't exist. I am able to fix the issue by mounting a local directory to that location in the container by adding -v ./mywineprefix:/mywineprefix like so. Note: you may need to create the mywineprefix folder via mkdir mywineprefix first.

docker run -it --rm -v ./.mywineprefix:/mywineprefix -v /your/data:/data proteowizard/pwiz-skyline-i-agree-to-the-vendor-licenses mywine msconvert /data/file.raw -o /data

In case anyone is running in Singularity (like I am), you would add -B ./mywineprefix:/mywineprefix instead, like below. Again, you may need to create the mywineprefix folder first using mkdir mywineprefix.

singularity exec -B ./mywineprefix:/mywineprefix -B /your/data:/data docker://proteowizard/pwiz-skyline-i-agree-to-the-vendor-licenses mywine msconvert /data/file.raw -o /data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants