Results 1 to 5 of 5

Thread: umask for daemons (atd)

  1. #1

    Question umask for daemons (atd)

    We have several data crunching openSuSE 10.3 computers. Users submit "at" jobs and wait for the result. The atd daemon stores the job output in the /var/spool/atspool directory with permissions that only allow root to read them (600). This is a problem because the people submitting the jobs often need to monitor the progress. (It is even helpful to see each others jobs in progress.) Right now we need to give out the root password to all users to be able to monitor the jobs. It would be much better if the umask of atd could be changed to allow anyone to read the output files. I tried putting umask in a .bash_profile file in the /var/spool/atjobs (this is the default home directory of the user "at". I also tried putting the umask command in the /etc/init.d/atd file's start section. (Then I stopped and started atd.) Neither of these ideas worked.

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: umask for daemons (atd)

    If users want to see the output from their jobs, they should not rely on the mail that's sent to them at the end of the job, but write the job in such a way so that output goes to a file of their choice. Something like this will work as the script. Then nothing is mailed to them, and everything goes to $HOME/myjob.out.

    exec > $HOME/myjob.out 2>&1
    command1
    command2
    etc, etc

  3. #3

    Exclamation Re: umask for daemons (atd)

    Quote Originally Posted by ken_yap View Post
    If users want to see the output from their jobs, they should not rely on the mail that's sent to them at the end of the job, but write the job in such a way so that output goes to a file of their choice. Something like this will work as the script. Then nothing is mailed to them, and everything goes to $HOME/myjob.out.
    That is an interesting approach. However, there are reasons we prefer to have the output mailed. There is often a distribution list for the mail. In addition we like the way the atd daemon handles the queuing of jobs. Therefore, I am still interested in learning a way to have the atd create these output spool files with group or world readable permissions.

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: umask for daemons (atd)

    In case you didn't understand, those lines were supposed to be submitted to at.

    You can still have your cake, just mail the output at the end of the job.

    exec > $HOME/myjob.out 2>&1
    command1
    command2
    etc, etc
    mail -s 'At job' $USER < $HOME/myjob.out

  5. #5

    Smile Re: umask for daemons (atd)

    Ok. I was not aware that you were suggesting that those commands be run under the at command.

    I found out why none of those umask methods I had tried worked. Three cheers for open source. I downloaded the source to atd and discovered that the permissions of the file create are quite specific. So I changed the program to create the file differently.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •