Jump to content

Server saving files as 644 (while I prefer 664)


Recommended Posts

Hi everyone,

Big time lurker here, usually I manage to find my answer by thoroughly searching and there is no need for me to post.

Perhaps I am just overlooking something really stupid here and hopefully someone has an answer for me.

My Linux server has multiple user accounts which are all in the same group.

For the users to be able to modify each others files the folder/file needs read and write permissions on this group.

This all works nicely and I am happy with this setup.

But the problem starts when my MTA servers (which are running under one of the users) save a file for example with xmlSaveFile() this file previously had the permissions 664 but now gets 644 which renders other users from the same group unable to modify the file.

Is there a way so the server saves files as 664 instaed of 644?

I have already tried running the server with different chmod permissions.

I have also tried running the server with sg.

Perhaps there is something I am overlooking?

Thanks in advance for your thoughts and help.

Link to comment

I hope you know what you are doing...

The umask command changes the creation mask for the current process and its childs.

Create the following startscript for the MTA server then:

#!/bin/bash 
  
echo "Setting umask..." 
umask g+w # In case you want to pass octal numbers: Keep in mind that you have to negate them before 
  
echo "Starting MTA now..." 
./mta-server64 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...