[vim/vim] Some directory and file permissions not set when installed from source. (Issue #9793)

44 views
Skip to first unread message

danzollers

unread,
Feb 17, 2022, 5:40:16 PM2/17/22
to vim/vim, Subscribed

Steps to reproduce

(As root)

# umask 027
# mkdir /opt/vim   # Can be any new directory, permissions `755`
# ./configure --prefix=/opt/vim && make && make install

Expected behaviour

All directories created during the install have permission 755, and all files have (at least) 644.

But with umask 027, I find:

# find /opt/vim -type d ! -perm -004
./share
./share/vim/vim82/colors/lists
./share/man
./share/man/fr.ISO8859-1
./share/man/tr.UTF-8
./share/man/de
./share/man/de.UTF-8
./share/man/tr.ISO8859-9
./share/man/pl.ISO8859-2
./share/man/fr
./share/man/da.ISO8859-1
./share/man/de.ISO8859-1
./share/man/da
./share/man/tr
./share/man/fr.UTF-8
./share/man/da.UTF-8
./share/man/it
./share/man/ru.UTF-8
./share/man/pl
./share/man/it.UTF-8
./share/man/ja
./share/man/pl.UTF-8
./share/man/it.ISO8859-1
./share/man/ru.KOI8-R

and

# find /opt/vim -type f ! -perm -004
/opt/vim/share/vim/vim82/ftplugin/logtalk.dict
/opt/vim/share/vim/vim82/colors/lists/default.vim
/opt/vim/share/vim/vim82/colors/lists/csscolors.vim

The directories have permissions 750 and files have permissions 640.

Version of Vim

8.2.4411

Environment

Operating System: Arch Linux
Terminal: XTerm(370)
Value of $TERM: xterm-256color
Shell: zsh

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9793@github.com>

Bram Moolenaar

unread,
Feb 18, 2022, 10:13:13 AM2/18/22
to vim/vim, Subscribed

Permissions 750 and 640 do not appear in src/Makefile. No idea where they came from.
Perhaps your environment defined them? Unfortunately, "make" picks up random environment variables, that can be confusing.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9793/1044680059@github.com>

danzollers

unread,
Feb 18, 2022, 3:40:24 PM2/18/22
to vim/vim, Subscribed

Permissions 750 and 640 do not appear in src/Makefile.

Right -- these permissions appear since the umask is set to 027. The 7 in particular prevents 'other' from getting any permissions.

For most installed files and directories, the umask doesn't matter -- they have rules in src/Makefile to set their permissions explicitly using chmod.

The directories/files I listed above are the remaining ones for which the umask will matter as they lack such rules.

These look like solutions for the affected files (and colors/lists/):

 # install the colorscheme files
 	cd $(COLSOURCE); $(INSTALL_DATA_R) *.vim lists tools README.txt $(DEST_COL)
- 	cd $(DEST_COL); chmod $(DIRMOD) tools
- 	cd $(DEST_COL); chmod $(HELPMOD) *.vim README.txt tools/*.vim
+ 	cd $(DEST_COL); chmod $(DIRMOD) lists tools
+ 	cd $(DEST_COL); chmod $(VIMSCRIPTMOD) *.vim README.txt lists/*.vim tools/*.vim
 # install the ftplugin files
 	cd $(FTPLUGSOURCE); $(INSTALL_DATA) *.vim README.txt logtalk.dict $(DEST_FTP)
- 	cd $(DEST_FTP); chmod $(HELPMOD) *.vim README.txt
+ 	cd $(DEST_FTP); chmod $(FILEMOD) *.vim README.txt logtalk.dict

I'm still digesting the Makefile, so I don't think I have great ideas yet for the rest of the affected directories.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9793/1045151431@github.com>

Bram Moolenaar

unread,
Feb 19, 2022, 8:24:35 AM2/19/22
to vim/vim, Subscribed

I see. Those files were added without updating the permissions.
The others should be in install-sh.
I'll make a patch. Please check and reopen the issue if not everything is covered.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9793/1046017762@github.com>

Bram Moolenaar

unread,
Feb 19, 2022, 8:26:03 AM2/19/22
to vim/vim, Subscribed

Closed #9793 via 20563e0.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/9793/issue_event/6105897996@github.com>

Reply all
Reply to author
Forward
0 new messages