* SUMMARY: File permission
@ 1996-05-13 15:25 Jay Shen
0 siblings, 0 replies; 2+ messages in thread
From: Jay Shen @ 1996-05-13 15:25 UTC (permalink / raw)
To: tru64-unix-managers
I was looking for a easy way to setup group file permission depending on
the group ownership. Thanks to hflogel@mailhub.wpl.com
Jay
>
> Let's say I have user a, b and c, and group x and y. Both user a and b has
> default group of x, c has default group of y. And b also belong to group y.
> And I also have the following directories:
> drwxr-xr-x 1 a x 1024 May 1 20:22 first
> drwxr-xr-x 1 b x 1024 May 1 20:10 second
> drwxrwsr-x 1 c y 1024 May 1 20:10 third
>
> Now I want user b to write to third directory with a default file
> permission of 770. I can easily accomplish this with umask. However, I do
> NOT want to change the umask because I want user b to have a default file
> permission of 755 when writing to second directory. Is there a way
> to accomplish this? Basiclly do selectly umask depending on the parent
> directory permission.
>
Jay,
A variant to the solution you desire can be accomplished with the
"newgrp" and "id" commands.
You can add the following to the user's .profile for Bourne shell,
or .kshrc for Korn shell:
case `id -gn` in
"x") umask 755;;
"y") umask 770; cd third;;
esac
When the user "b" wants to work in the "third" directory, use the command
"newgrp y", which will change the file permission mask to the desired
value. To revert to the default group give the "newgrp" command without
an argument, this will also revert the file permission mask. There is one
caveat. User "b" can write to both directory "second" and "third" regardless
of his current group id setting; just belonging to group "y" gives "b" the
correct permissions to put and modify files there, and "b" is the owner of
directory "second" which also gives "b" sufficient rights there. So, user
"b" must always be aware of the current group id setting and the current
working directory.
Hope this helps.
Hal
hflogel@mailhub.wpl.com
^ permalink raw reply [flat|nested] 2+ messages in thread* SUMMARY file permission...
@ 1998-04-09 15:52 CHANTHP
0 siblings, 0 replies; 2+ messages in thread
From: CHANTHP @ 1998-04-09 15:52 UTC (permalink / raw)
To: tru64-unix-managers
Hi all,
I don't get any responsed for this question, but I have
the answer on my own.
The answer is by modify the /etc/inetd.conf, and add
-u002 flag to where ftpd daemon start.
example:
~bin/ftpd ftpd -a -d -v -l -t600 -i -o -u002
then kill -HUP ftpd_pid
and it works, but it doensn't work under the 'beta-15' version?
______________________________ Forward Header __________________________________
Subject: file permission...
Author: PHETPHONE D CHANTHAVONG at ~W300F2
Date: 4/2/98 10:00 AM
Hello all,
My Digital UNIX systems are running wu-ftp ranging from version of
beta-13 to beta-16. Under the real users account, every time when
I uploaded file(s) to certain directory from my PC, and I get file
permission default with rw-r--r-- (644), but I want rw-rw-r-- (664)
as the default every time when I uploaded.
Do you know why? and how do I fix it?
Under '/etc/profile' file , I set 'umask 002' so, I would get
the default file permission with 664 for all real users.
I appreciated your comments...
Thanks,
/Pat
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-04-09 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-05-13 15:25 SUMMARY: File permission Jay Shen
-- strict thread matches above, loose matches on Subject: below --
1998-04-09 15:52 SUMMARY file permission CHANTHP
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox