GulibleFootstool32 Posted January 14, 2016 Share Posted January 14, 2016 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
Jusonex Posted January 14, 2016 Share Posted January 14, 2016 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
GulibleFootstool32 Posted January 14, 2016 Author Share Posted January 14, 2016 Whoa, thanks for the fast reply! I am familiar with umask and its octal codes. My servers are also started/stopped with shell scripts so a quick edit should do the trick. Thanks a bunch Jusonex! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now