Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
File creation from workflow task
mike_s
TS 5.5.2 - all latest patches/SP's running on Solaris.
Can anyone tell me what factors influence the permissions on newly created log files?
I have a workflow task which creates a log file but the permissions set on the two machines differ - on one server the files are created as -rw-r--r-- (which is what I want) while on the other server the files are created as rw-rw---- (which is *not* what I want).
Running the umask command at the command line, when logged on as the user that is the owner of the external task creating the log file shows 007 on both servers.
What else should I be checking?
Thanks in advance.
Mike
Find more posts tagged with
Comments
nipper
RTFM
Admin manual
Default Permissions
mike_s
Maybe I should have said that iw.cfg on *both* servers contains the following entries:
branch_default_perm=775
workarea_default_perm=775
file_default_perm=664
directory_default_perm=775
Although I was under the impression that these settings only determine permissions of files created in the content store.
The files I'm creating are log files and are held outside the content store.
nipper
Yes, that is true, I misread your original request.
I would have thought the perms would be rw-rw---- as per your umask,
What happens if you change the umask to 022 on the server ?
That should strip the write access out for the group
Andy
mike_s
I've just realised that the umask may be 022 on both servers not 007 (I'd su'd without the dash as the first parameter) but I'm not sure what happens when a workflow task runs as a particular user - is it the same as su'ing without the dash or not? I'm not even sure using the umask command is going to tell me anything useful here.
What I actually want is for the files to be created with rw-r--r-- (664) which would require a umask of 133, as I understand it. However, as neither of my servers are creating files with permissions of 755 (rwxr-xr-x) which I would have expected from a umask of 022, nor are they creating files with permissions of 770 which I would expect from a umask of 007, there must be more to it than that - or I simply do not understand how the whole thing works (which is entirely possible - hence the post).
Mike
nipper
for the proper umask you need to su -
the su command inherits info from the previous shell which is useful when
you want path & everything intact. But to replicate the WF invocation, su -
will be more accurate.
Unix is also smart about how it assigns permissions. It uses the magic file
to determine the base permissions. That considers the file extensions
as well as the first 512 characters to see if a file should start as a base of 777
or 666, then the umask is applied to it.
If Unix sees a she-bang statement as the 1st line, it is executable and should start as
such.
man umask will help
HTH
Andy
mike_s
Thanks for the info Andy - that does explain why a umask of 022 would result in a file becoming 644.
Further checking shows that creating files manually using 'touch' creates files with the same permissions on both servers.
Unfortunately, it doesn't explain why two servers, with the same umask, when creating files as part of a workflow task owned by the same user, creates them with different permissions.
I have removed all code other than that used to create the files, so there is not sneaky chmod'ing going on in the script.
It has to be either a system setting or a TeamSite setting. I'm thinking that maybe the workflow task doesn't do an su - and so doesn't inherit the umask of the user as expected. However, I've checked the umasks for iwui on both servers and they are the same.
????