Hi, Why is the /var/spool/sss/cqm file world writable? -rw-rw-rw- 1 root root 31332 Sep 1 07:45 /var/spool/sss/cqm It is created this way by Cobalt (to verify, I moved it out of the way and when it recreated the file it was 666 again). Thanks, Susan.
"Susan" == Susan Coghlan <[email protected]> writes:
Susan> Hi, Susan> Why is the /var/spool/sss/cqm file world writable? Susan> -rw-rw-rw- 1 root root 31332 Sep 1 07:45 /var/spool/sss/cqm Susan> It is created this way by Cobalt (to verify, I moved it out Susan> of the way and when it recreated the file it was 666 again). maybe the server is running with a wonky umask? I don't think that we have this problem on chiba. We should probably fix it in code as well, but setting the umask in the cobalt init script would probably do the trick... -nld
Why would the server be running with a wonky umask? Root's umask is set properly and new files created by root are never world writable. I'm willing to put in a umask in the init script, as setting to what we want can never hurt, but I'd still like to understand why that is necessary. Susan. On Thu, 1 Sep 2005, Narayan Desai wrote:
"Susan" == Susan Coghlan <[email protected]> writes:
Susan> Hi,
Susan> Why is the /var/spool/sss/cqm file world writable?
Susan> -rw-rw-rw- 1 root root 31332 Sep 1 07:45 /var/spool/sss/cqm
Susan> It is created this way by Cobalt (to verify, I moved it out Susan> of the way and when it recreated the file it was 666 again).
maybe the server is running with a wonky umask? I don't think that we have this problem on chiba. We should probably fix it in code as well, but setting the umask in the cobalt init script would probably do the trick... -nld
"Susan" == Susan Coghlan <[email protected]> writes:
Susan> Why would the server be running with a wonky umask? Root's Susan> umask is set properly and new files created by root are never Susan> world writable. I'm willing to put in a umask in the init Susan> script, as setting to what we want can never hurt, but I'd Susan> still like to understand why that is necessary. No clue, but python acts in the right fashion in this case, ie: [0:223] python Python 2.3.5 (#2, Aug 30 2005, 15:50:26) [GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
a = open('/tmp/file.testing', 'w+') a.write('foo\n') a.close()
[0:224] ls -l /tmp/file.testing -rw-r--r-- 1 desai desai 4 Sep 1 10:02 /tmp/file.testing
This is all we do for state files. -nld
What do the ncar guys see? Do they have world writable as well? On Thu, 1 Sep 2005, Narayan Desai wrote:
"Susan" == Susan Coghlan <[email protected]> writes:
Susan> Why would the server be running with a wonky umask? Root's Susan> umask is set properly and new files created by root are never Susan> world writable. I'm willing to put in a umask in the init Susan> script, as setting to what we want can never hurt, but I'd Susan> still like to understand why that is necessary.
No clue, but python acts in the right fashion in this case, ie:
[0:223] python Python 2.3.5 (#2, Aug 30 2005, 15:50:26) [GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
a = open('/tmp/file.testing', 'w+') a.write('foo\n') a.close()
[0:224] ls -l /tmp/file.testing -rw-r--r-- 1 desai desai 4 Sep 1 10:02 /tmp/file.testing
This is all we do for state files. -nld
"Susan" == Susan Coghlan <[email protected]> writes:
Susan> What do the ncar guys see? Do they have world writable as Susan> well? It looks like some of the ones on chiba are writeable, and some aren't. I am not sure what is going on here. The attached patch will ensure that this won't happen (in a racy way), but there is a more subtle problem going in here that I don't understand. -nld --- 1.198/lib/python/server.py 2005-07-25 15:28:29 -05:00 +++ edited//home/desai/dev/sss/lib/python/server.py 2005-09-01 12:56:54 -05:00 @@ -522,6 +522,7 @@ data = open(self.__statefile__, 'w') dump(state, data) data.close() + chmod(self.__statefile__, 0600) except (IOError, OSError): raise StateSaveError except RuntimeError:
You wrote:
What do the ncar guys see? Do they have world writable as well?
Yes, all the subdirectories of /var/spool/sss are mode 666 on our machine as well.
On Thu, 1 Sep 2005, Narayan Desai wrote:
"Susan" == Susan Coghlan <[email protected]> writes:
Susan> Why would the server be running with a wonky umask? Root's Susan> umask is set properly and new files created by root are never Susan> world writable. I'm willing to put in a umask in the init Susan> script, as setting to what we want can never hurt, but I'd Susan> still like to understand why that is necessary.
No clue, but python acts in the right fashion in this case, ie:
[0:223] python Python 2.3.5 (#2, Aug 30 2005, 15:50:26) [GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
a = open('/tmp/file.testing', 'w+') a.write('foo\n') a.close()
[0:224] ls -l /tmp/file.testing -rw-r--r-- 1 desai desai 4 Sep 1 10:02 /tmp/file.testing
This is all we do for state files. -nld -- Sean McCreary [email protected]
participants (3)
-
Narayan Desai -
Sean McCreary -
Susan Coghlan