File: mergeall-products/unzipped/test/ziptools/docetc/1.1-upgrades/exfat-has-no-unix-perms.txt

#######################################################################
# Demo the lack of Unix-style permissions support on exFAT drives.
# This was run on Mac OS (El Capitan), and Samsung_T5 uses exFAT.
#######################################################################

# Unzip to exFAT
/Volumes/Samsung_T5/_test$ py3 $Z/zip-extract.py cgi.zip . -permissions | tail -n 1
Extract finished: files=32, folders=4, links=4, unknowns=0.

# All permissions lost
/Volumes/Samsung_T5/_test$ ls -l cgi
total 5632
-rwxrwxrwx  1 blue  staff    1219 Jun 13  2017 DIFFS-with-offline-june2017.txt
lrwxrwxrwx  1 blue  staff      12 Mar 21 13:37 DIRLINK1 -> LIVE-Aug2017
lrwxrwxrwx  1 blue  staff      13 Mar 21 13:38 DIRLINK2 -> LIVE-Aug2017/
lrwxrwxrwx  1 blue  staff      11 Mar 21 13:36 FILELINK1 -> showcode.py
lrwxrwxrwx  1 blue  staff      25 Mar 21 13:37 FILELINK2 -> sitesearch-savedterms.txt
-rwxrwxrwx  1 blue  staff    1768 Jun 29  2019 HOW-INSTALL-CGI-SCRIPTS.txt
-rwxrwxrwx  1 blue  staff    1042 Apr 14  2018 HOW.txt
drwxrwxrwx  1 blue  staff  131072 Aug  6  2017 LIVE-Aug2017
drwxrwxrwx  1 blue  staff  131072 Jun 13  2017 LIVE-June2017
-rwxrwxrwx  1 blue  staff    6315 Feb 17  2018 __prior-sitesearch-savedterms.txt
-rwxrwxrwx  1 blue  staff    5205 Jul 30  2017 _prior-sitesearch-savedterms.txt
drwxrwxrwx  1 blue  staff  131072 Jun 13  2017 dev
-rwxrwxrwx  1 blue  staff    2584 Feb 23 14:55 index.html
-rwxrwxrwx  1 blue  staff   20729 Feb 18  2014 pylotto-full.py
-rwxrwxrwx  1 blue  staff     151 Jun 13  2017 pylotto.py
-rwxrwxrwx  1 blue  staff    3035 Jul 19  2019 showcode-template.txt
-rwxrwxrwx  1 blue  staff      72 Feb 23  2018 showcode-unicode-demo.txt
-rwxrwxrwx  1 blue  staff   26250 Aug 19  2019 showcode.py
-rwxrwxrwx  1 blue  staff   13948 Jun 30  2019 sitesearch-savedterms.txt
-rwxrwxrwx  1 blue  staff   14054 Jun 29  2019 sitesearch.py
-rwxrwxrwx  1 blue  staff   15372 Feb 23 14:55 temp.html
-rwxrwxrwx  1 blue  staff      78 Apr 14  2018 test.py

# Manual changes fail too
/Volumes/Samsung_T5/_test$ chmod 400 cgi/test.py 
/Volumes/Samsung_T5/_test$ ls -l cgi/test.py 
-rwxrwxrwx  1 blue  staff  78 Apr 14  2018 cgi/test.py

/Volumes/Samsung_T5/_test$ chmod 200 cgi/test.py 
/Volumes/Samsung_T5/_test$ ls -l cgi/test.py 
-rwxrwxrwx  1 blue  staff  78 Apr 14  2018 cgi/test.py

# But non-exFAT works
/Volumes/Samsung_T5/_test$ py3 $Z/zip-extract.py cgi.zip ~/Desktop/tempcgi -permissions | tail -n 1
Extract finished: files=32, folders=4, links=4, unknowns=0.

/Volumes/Samsung_T5/_test$ ls -l ~/Desktop/tempcgi/cgi/test.py 
-rwxr-xr-x  1 blue  staff  78 Apr 14  2018 /Users/blue/Desktop/tempcgi/cgi/test.py



[Home page] Books Code Blog Python Author Train Find ©M.Lutz