Samba Drive

Net

Golden Member
Aug 30, 2003
1,592
3
81
Hello,

We use a samba drive for our webpage. It has worked great in the past.

Now for some reason every time someone creates a file or folder in public_html the permissions of that file or folder are set to rwx----

we have to manually change the permission to rwxr-x-r-x

How can we make it so every file and or folder created under public_html has the permissions 755 .. (rwx r-x r-x)
 

mcmilljb

Platinum Member
May 17, 2005
2,144
2
81
Check the umask for the users that are creating the files. The umask determines what the default permissions for the current process when creating files(folders are files too). You can check the umask value by typing "umask -S". It will probably look like this:

$ umask -S

u=rwx,g=,o=

To fix this, add this line to your shell login script:

$ umask 022

Then it should look like this:

$ umask -S

u=rwx,g=rx,o=rx

The process of determining the umask is overly complicated for such a simple task so just read the easy steps for doing it on wikipedia - http://en.wikipedia.org/wiki/Umask or read the man page for umask.