Issue with UMASK in virtualmin

SYSTEM INFORMATION
OS type and version Ubuntu server 22.04
Webmin version Latest
Virtualmin version Latest
Related packages Virtualmin

I create a virtual server and installed wordpress. I checked the umask for the user its 002. When ever i create a new file using file manager the permissions are 644. why its like that it must be 664. also whenever i upload a file in wordpress the newly created file is also 644 instead of 664. I mean why its not obeying umask. Is there any way to fix it.

644 is normal for websites. I’ve never seen 664 being used.
I just checked the umask for the admin user and its 0022, not sure why you user would be 002

2 Likes

I know its 644 and works for most of the cases. but is it possible to get 664.

The umask for files created by Webmin is controlled under Webmin ⇾ Webmin Configuration: Advanced Options page. For files created under FTP and SSH, it is controlled on the service configuration side.

2 Likes

SIr just another simple question. At Webmin ⇾ Webmin Configuration: Advanced Options in Umask section how should i put the value. I mean 3 digit or 4 digit. example 002 or 0002. Thankyou

umask must be a 3-digit octal number, as when you set a umask , you’re specifying which permission bits should not be set when a file or directory is created. The reason it must be a 3-digit octal number is that Unix permissions are grouped into three sets (owner, group, others) and each type of permission (read, write, execute) is represented as an octal digit within these sets, i.e.:

  • Read (r) permission is represented by the number 4
  • Write (w) permission is represented by the number 2
  • Execute (x) permission is represented by the number 1

The umask subtracts permissions from the default.

1 Like

Thankyou for reply sir :slight_smile:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.