[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: to use ns in a shared directory



On Tue, 25 Jan 2000, Fusun Inanc wrote:

> I have installed ns-allinone-2.1b5 on to my Sun Solaris 2.7 unix server.
> In my lab, three students are using ns for their projects. I cannot install 
> ns in three different directories because I don't have this much space in the 
> server. And also later on the number of students who use ns might increase .
> Instead we all have to use the same source of ns. 
> 
> For this purpose I created a common user in my unix system and installed ns in 
> to this user's home directory. and give permission to the group to use these 
> files. 
> 
> But this cause the problem. Everytime whenever one of us compiles ns, the 
> permission of some files is changed to that user as wrx and group permission is 
> gone. And whenever the other user wants to compile it s/he has problems like 
> permission denied...
> 
> How can I solve this problem.  Any help on this will be greatly appreciated.

Write a find script that runs through everywhere changing permissions,
and run it before/after each compile. Something like:


#!/bin/csh
# I really should read 'Csh Programming Considered Harmful' again.
# Quicker, darker, more seductive it is. not more powerful. 

# modify to suit
setenv sharednsdir /user/shareduser/ns-2.1b5
       
# do the directories
find $sharednsdir -type d -print -exec chmod 770 {} \;

# do the files
find $sharednsdir -type f -print -exec chmod 770 {} \;


...although you'll probably want to enlarge on and fine-tune this for
various filetypes/directories on -name pattern-match to minimise the
potential for editing screwups, and in any case you should really be
getting your students to check their changes into a cvs tree held
elsewhere, since major uncoordinated revisions by multiple people sans
source control is a disaster waiting to happen.

L.

'hey, my simulation just died!' 'oh, I started recompiling. so sorry.'
oh yeah, chmod the binary to read-only so it must be explicitly unset.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>