-
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
[LAMP] set bitnami apache php process to run with umask 002 #1724
Comments
You could change the start.sh scripts under /opt/bitnami/scripts/COMPONENT to set the umask before running the process or you can create a home folder for the daemon user and configure the profile. https://serverfault.com/questions/166176/ways-to-set-umask-on-ubuntu-for-daemon-processes Please note that these questions are admin-related ones and it's out of the scope of this support forum. Please check the information available online to know how to set the umask of a running process. |
Hi === vi /opt/bitnami/scripts/apache-env.sh and added these 2 lines: === #- set umask of 002 so DIR=775 and FILES=664 === restart server === === get httpd process ID === === check the umask of a running proccess id =========== as you can see the umask is still 0022 and not 0002 === I even adding this line to bitnami.apache.service did not work ======= [Service] |
Try editing the start.sh file under /opt/bitnami/scripts/apache and set the umask just before the apache command |
Hmm I can't find a start.sh anywhere: ls -al /opt/bitnami/scripts/apache find /opt/bitnami/ -type f -print |grep -i start |
Sorry for the wrong info, I thought you were using a different asset.
I understand this file existed and you only edited it to add the UMask line, right? https://unix.stackexchange.com/questions/367757/set-umask-for-systemd-unit Please remember to reload the information before restarting the services. If that doesn't work, you can try setting the umask value in the /opt/bitnami/apache2/bin/envvars file https://serverfault.com/questions/383734/how-do-i-set-default-umask-in-apache-on-debian |
Hi, I found the solution!! Your comment about: "remember to reload the information before restarting the services" made me think... I realized I was only restarting the bitnami services. So what I did was edit /etc/systemd/system/bitnami.apache.service and add UMask=0002 in the [Service] section, and then reboot the whole server. $ ps -aef |grep httpd $ grep -i umask /proc/489/status Thank you for your support! |
I'm glad to hear that everything is working as expected now. However, just for future reference, it's not necessary to reboot the server, simply reload the systemd configuration
https://askubuntu.com/questions/1336532/what-is-the-difference-betweem-daemon-reload-and-reload |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary. |
Describe your issue as much as you can
I created a Google VM by going to the Google Marketplace and creating a new BITNAMI PACKAGE FOR LAMP VM at: https://console.cloud.google.com/marketplace/product/bitnami-launchpad/lampstack
How do I configure the Bitnami apache and PHP processes to run with a umask of 002 so files are created with 0664 and folders with 0775.
The text was updated successfully, but these errors were encountered: