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

make install may make directories with wrong permissions #926

Closed
ileGITimo opened this issue Dec 1, 2023 · 2 comments
Closed

make install may make directories with wrong permissions #926

ileGITimo opened this issue Dec 1, 2023 · 2 comments
Labels
type:bug Something's broken!

Comments

@ileGITimo
Copy link
Contributor

ileGITimo commented Dec 1, 2023

Will skip some of the irrelevant bullets.

Upfront Information

If from a git clone, after a successful configure and make, one runs
sudo make install
several mkdir commands will be issued, like
/bin/mkdir -p /path/to/needed/directory
e.g.
/bin/mkdir -p '/usr/local/libexec/fvwm3/1.0.9'
If the user's umask is something like 022, those directories that are new, like fvwm3 of fvwm3/1.0.x, will be created with 700 permissions, owned by root, and thus some features are not accessible

  • Fvwm3 version (run: fvwm3 --version)
    fvwm3 1.0.9 (1.0.8-30-gb725f2e9)
    but it happened to me in builds of 1.07 and 1.0.8 too

  • Linux distribution or BSD name/version
    Fedora 39

  • Platform (run: uname -sp)
    (actually from uname -a)
    Linux 6.6.2-201.fc39.x86_64 Create fvwm.da.po #1 SMP PREEMPT_DYNAMIC Wed Nov 22 21:31:42 UTC 2023 x86_64 GNU/Linux

Expected Behaviour

folders like above created with 755 mode, not 700

What were you trying to do? Please explain the problem.

compiling and running latest fvwm3

Actual Behaviour

fvwm3 starts, maybe because I fixed some other folders before, but for each new rev, the new modules directory has wrong permissions, and e.g. my pager doesn't start

See this stacked exchange post on a couple of ways to fix this:
https://unix.stackexchange.com/questions/435995/how-to-make-autoconf-use-install-instead-of-mkdir-p

@ileGITimo ileGITimo added the type:bug Something's broken! label Dec 1, 2023
@ThomasAdam
Copy link
Member

Hi,

I appreciate this is frustrating, but if you're going to set a slightly different umask, then you'll have to ensure that you set MKDIR_P yourself.

I don't want to be in a position where I'm overriding this check in configure.ac based on something like a umask -- as there could be portability issues in doing so.

@ileGITimo
Copy link
Contributor Author

These are the directories where mkdir is used:

/usr/local/bin
/usr/local/libexec/fvwm3/1.0.9
/usr/local/share/fvwm3
/usr/local/share/fvwm3/default-config
/usr/local/share/fvwm3/perllib/FVWM
/usr/local/share/fvwm3/perllib/FVWM/Module
/usr/local/share/fvwm3/perllib/FVWM/Tracker
/usr/local/share/fvwm3/perllib/General
/usr/local/share/man/man1
/usr/local/share/xsessions

Your choice, obviously, but fail to see a situation why these shouldn't have mode 755.

And files in these directories

/usr/local/share/fvwm3
/usr/local/share/fvwm3/default-config
/usr/local/share/fvwm3/perllib/FVWM
/usr/local/share/fvwm3/perllib/FVWM/Module
/usr/local/share/fvwm3/perllib/FVWM/Tracker
/usr/local/share/fvwm3/perllib/General
/usr/local/share/man/man1
/usr/local/share/xsessions

are created with install -m 644, thus overriding the umask, while files in these directories

/usr/local/libexec/fvwm3/1.0.9
/usr/local/bin

are created without an explicit -m mode (and I had to fix them when I installed 1.0.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something's broken!
Projects
None yet
Development

No branches or pull requests

2 participants