-
Notifications
You must be signed in to change notification settings - Fork 47
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
Making everything executable in config_dir sounds wrong #38
Comments
The directories need to be executable so that they can be listed though, and there's no simple portable way to have a chmod command set different permissions on files vs. directories. |
This is not the case for webmin. i.e. /etc/webmin seems to set permission properly. If you just want to set permissions on directory then its easy.
For permissions on files:
You can also combine above two.
|
As far as I know, |
Is there any downside to making config files executable though? |
That's a strange and unexpected question from you! Basic principle of *NIX security is not to make files executable unless they are actually meant to be executed. Executable permission may not harm but no security expert would recommend doing it because you never know, there can be flaw anywhere in software. |
@amishxda I don't think you getting the things right, sorry. You need https://unix.stackexchange.com/q/21251/34581 |
Yes so why give 755 to all the files under it? (why -R switch?) Use find and chmod combination above which will chmod only directories. PS: You probably missed my 2nd comment here #38 (comment) |
All those files are just config files though .. even with the executable bit, they can't be run! |
They can be run - the shell will try to run and set environment and then do nothing and exit. Ofcourse it wouldnt make much sense. But still all I am saying is, if files are not meant to be executed - the executable bit should not be set unnecessarily. Any "unknown" flaw in usermin can be exploited. (even if chances are very remote) |
Created PR #39. Note that "find" command is portable and is already used at other places in setup.sh config files anyway has 644 - so no need to chmod them. |
usermin/setup.sh
Line 629 in 8bc6f5c
This line makes everything under config directory (normally /etc/usermin) world executable, including all the config files and var-path, perl-path, version, webmin.acl, miniserv.users, miniserv.conf etc
Which is wrong.
Probably only 2 files, named start and stop require executable permissions.
So please fix it.
Thank you
The text was updated successfully, but these errors were encountered: