Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to solve a problem with the use of a Red Hat server to run IC simulations.

Previously the IC projects were being stored on my Windows Server 2003, but the simulation tools were run on a Red Hat machine. This was a constant headache for me because the simulations would run extremely slow and I would get bitched at a lot by the IC guys.

I decided to try to store the projects directly on the Red Hat machine to see if that would speed the process up. The simulations were running a lot faster and everyone was happy, but I have noticed another problem with this setup.

Any files that are created during simulation or the IC guys put on the server gets automatically assigned permissions of rx-r--r-- and then they can't change those files. So I then get called to chmod the files so the guys have write access to their own files.

I am very new at doing this and am confused by the whole scenario. I was hoping there was a way to have the files automatically, through a script or config change, to have a certain permission on them.

Thank you for your help and please forgive my ignorance.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

I'm sorry but I dont get why you wouldnt just change the umask on the user profile to allow group to write? Then all users could be added to the same group. I dont know how that IC application works though so maybe that's why I dont get it.

I dont want to offend you but in case you dont know what I'm talking about I figured I would add some info. Basically user profiles have a set permission as default for all files created by them called the umask. In Ubuntu by default is 022 which means that all files created by users will be set at 755(user:rwx, group r-x, others r-x). In your case sounds like the mask is set to 033. Change it to 003 and any members of the same group as the creator can modify it. Just add all the users to the same group as the "application user" group. I believe you might have to set it as the main group as well.

I could be completely off since like I said I dont know the app/environment you are working with.

share|improve this answer
    
Thank you for your answer. It seems like this would be a good solution. You did not offend me in any way, I am very new to this. I will look into this solution. –  shagism Dec 13 '10 at 15:30
add comment

Without going into the 500 other questions about how to actually fix your application, the quick and dirty:

1) make a script on the drive, say in /usr/local/sbin/fixperms.sh

#!/bin/sh
MYPATH=/location/of/files
cd ${MYPATH} && find . -type f -print0 | xargs -0 chmod 0664
cd ${MYPATH} && find . -type d -print0 | xargs -0 chmod 0775
cd ${MYPATH} && chgrp -R <group name all your users are in>

2) make the script executable by root:

chmod 0744 /usr/local/sbin/fixperms.sh
chown root:root /usr/local/sbin/fixperms.sh

3) as root, run "crontab -e" and paste this in:

*/15 * * * * /usr/local/sbin/fixperms.sh

The script in (1) will run every 15 minutes by (3) and fix your files permissions and ownership.

share|improve this answer
    
Cool. Thank you. I didn't expect an answer to solve the all the issues, but this will get people off my back for a while –  shagism Dec 11 '10 at 0:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.