Date: Mon, 26 Mar 2012 12:45:56 -0600
Reply-To: Fried Egg <friedegg2012@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Fried Egg <friedegg2012@GMAIL.COM>
Subject: Re: SAS on UNIX/LINUX - Programatically assigning Group to data
sets
In-Reply-To: <BLU152-W33308235F3E8C95F007EDDE450@phx.gbl>
Content-Type: text/plain; charset="us-ascii"
In unix and linux in order to run chown you need to either already be the
owner of the file you are altering or be root or a sudoer.
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of toby
dunn
Sent: Monday, March 26, 2012 12:41 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SAS on UNIX/LINUX - Programatically assigning Group to data
sets
Jack,
Not sure about linux but Unix at some point they chenged it up where you
have to have admin prevelideges to do a chown...
So when I clean our data it is all hidden away, then when I get the stats
peesp version ready I copy it out to their directory and can change the
permissions as well as group.
Toby Dunn
If you get thrown from a horse, you have to get up and get back on, unless
you landed on a cactus; then you have to roll around and scream in pain.
"Any idiot can face a crisis-it's day to day living that wears you out"
~ Anton Chekhov
> Date: Mon, 26 Mar 2012 14:22:03 -0400
> From: jclark@HILLTOP.UMBC.EDU
> Subject: SAS on UNIX/LINUX - Programatically assigning Group to data
> sets
> To: SAS-L@LISTSERV.UGA.EDU
>
> Hello,
>
>
>
> We have a set of SAS programs which are run monthly on LINUX
> (submitted remotely through PC SAS). We have a primary person who runs
> the jobs, but need a back-up person who can do it as well. I'm not an
> expert on LINUX, so please forgive any mistakes or simplifications I
> make in asking this question. I'll try to give some background to the
issue...
>
>
>
> Currently the permissions on LINUX are set up so that the owner
> (person creating the file) has RWX permissions and the group and
> everyone else have R-permissions. The problem this causes is when the
> back-up person tries to run the job to re-create data sets, they do
> not have permissions to overwrite existing files.
>
>
>
> I tried to work with our LINUX administrator to find a solution for
> this. We set up a group (called DSS) that had the primary and back-up
> person as members of the group. We also set all data sets in the
> directories to have DSS as their group and we changed group
> permissions to RWX. The back-up person ran the SAS program and was
> able to re-create the data sets with no permission issues.
>
>
>
> Everything seemed good - until I checked the Group assignment for the
> new files. It was USER, which is the default group assignment and
> includes everyone at our company with a LINUX account. Our
> administrator said he could change the default Group to DSS for the 2
> people running the SAS updates, but that would result in everything
> they do on LINUX having a group assignment of DSS (don't really want
> this, as this update is just one thing of many that are done on LINUX).
>
>
> The administrator said that typing "newgrp - dss" at the command
> prompt will cause subsequent data sets created to have the DSS group.
> We have several dozen SAS programs as part of this update, and I don't
> want to add a manual process. I was thinking of adding code to the
> beginning of each SAS program that could execute an operating system
> command to set Group.
>
>
>
> Has anyone had to do something like this? Does anyone have suggestions
> for syntax for this (I've used the X command a long time ago)? Should
> I be taking this approach, or am I way off base? Should my
> administrator have better suggestions for me? Any feedback is appreciated.
>
>
>
>
>
> Jack
>
>
>
> Jack Clark
> Senior Programmer
> phone: 410-455-6256
> fax: 410-455-6850
> jclark@hilltop.umbc.edu
>
> University of Maryland, Baltimore County Sondheim Hall, 3rd Floor
> 1000 Hilltop Circle
> Baltimore, MD 21250
>
> Please consider the environment before printing this e-mail and/or any
attachments.
>
>
> Confidentiality Notice: This e-mail may contain information that is
legally privileged and that is intended only for the use of the addressee(s)
named above. If you are not the intended recipient, you are hereby notified
that any disclosure, copying of this e-mail, distribution, or action taken
in reliance on the contents of this e-mail and/or documents attributed to
this e-mail is strictly prohibited. If you have received this information in
error, please notify the sender immediately by phone and delete this entire
e-mail. Thank you.
|