I think Adam was asking how to change the umask value for all processes that are trying to operate on the /opt/lampp/htdocs
directory.
The user file-creation mode mask (umask) is used to determine the file permissions for newly created files. It can be used to control the default file permissions for new files.
so if you will use some kind of FTP program to upload files into /opt/lampp/htdocs
you need to configure your FTP server to use the umask you want.
If files / directories need be created, for example, by PHP, you need to modify the PHP code:
<?php
umask(0022);
// Other code
?>
If you will create new files / folders from your Bash session, you can set umask value in your shell profile ~/.bashrc file.
Or you can set up a umask in /etc/bashrc
or /etc/profile
file for all users.
Add the following to the file:
umask 022
Sample umask Values and File Creation Permissions
If umask value set to User permission Group permission Others permission
000 all all all
007 all all none
027 all read / execute none
And to change permissions for already created files, you can use find.
chmod 75 /opt/lampp/htdocs
or should that really bechmod 755 /opt/lampp/htdocs
? – Yardfind . -type f -name "*.sh" -exec chmod +x {} \;
– Petrography