spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.33k stars 1.61k forks source link

File permissions in WSL2 are not preserved when saving with a Windows installation of Spyder #20757

Open jtziebarth opened 1 year ago

jtziebarth commented 1 year ago

Issue Report Checklist

Problem Description

Permissions of a file in WSL2 are not preserved when editing and saving the file using a Windows installation of Spyder.

This problem seems to have appeared before, but I'm encountering it under different circumstances.

What steps reproduce the problem?

  1. Create a new file "test.py" in Windows installation of Spyder and save it to a location under the WSL2 filesystem
  2. In WSL2, run stat -c '%a' test.py
  3. In WSL2, run chmod +x test.py
  4. In WSL2, run stat -c '%a' test.py
  5. Edit the test.py in the Windows installation of Spyder and save your changes.
  6. In WSL2, run stat -c '%a' test.py

What is the expected output? What do you see instead?

Expected Output: 644 755 755

Actual Output: 644 755 644

Versions

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.1 (OK)
chardet >=2.0.0               :  5.1.0 (OK)
cloudpickle >=0.5.0           :  2.2.1 (OK)
cookiecutter >=1.6.0          :  2.1.1 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.31.1;<9.0.0       :  8.11.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.2 (OK)
jellyfish >=0.7               :  0.11.0 (OK)
jsonschema >=3.2.0            :  4.17.3 (OK)
keyring >=17.0.0              :  23.13.1 (OK)
nbconvert >=4.0               :  7.2.10 (OK)
numpydoc >=0.6.0              :  1.5.0 (OK)
paramiko >=2.4.0              :  3.1.0 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.9.4 (OK)
pygments >=2.0                :  2.14.0 (OK)
pylint >=2.5.0;<3.0           :  2.17.1 (OK)
pylint_venv >=2.1.1           :  3.0.1 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.7.1;<1.8.0          :  1.7.1 (OK)
pylsp_black >=1.2.0           :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0     :  3.0.3 (OK)
qstylizer >=0.2.2             :  0.2.2 (OK)
qtawesome >=1.2.1             :  1.2.3 (OK)
qtconsole >=5.4.0;<5.5.0      :  5.4.1 (OK)
qtpy >=2.1.0                  :  2.3.0 (OK)
rtree >=0.9.7                 :  1.0.1 (OK)
setuptools >=49.6.0           :  65.6.3 (OK)
sphinx >=0.6.6                :  6.1.3 (OK)
spyder_kernels >=2.4.2;<2.5.0 :  2.4.2 (OK)
textdistance >=4.2.0          :  4.5.0 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  3.0.0 (OK)
zmq >=22.1.0                  :  25.0.2 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=3.0.0            :  3.7.1 (OK)
numpy >=1.7                   :  1.24.2 (OK)
pandas >=1.1.1                :  1.5.3 (OK)
scipy >=0.17.0                :  1.10.1 (OK)
sympy >=0.7.3                 :  1.11.1 (OK)
ccordoba12 commented 1 year ago

Hey @jtziebarth, thanks for reporting. We'll see what we can do about this.

@dalthviz, are you able to reproduce this problem on your side?

ccordoba12 commented 1 year ago

Pinging again @dalthviz about this one (it seems he forgot it).

dalthviz commented 1 year ago

Checked with Spyder 5.4.3 from the standalone installer on Windows and I was able to reproduce this :+1:

ccordoba12 commented 1 year ago

Ok, and how easy do you think it is to solve? I'm asking that to know if we should try to address it in 5.4.4 or leave it for Spyder 6.

dalthviz commented 1 year ago

No idea what could be happening here so probably something to check for Spyder 6?