Operating System - HP-UX
1753516 Members
5391 Online
108795 Solutions
New Discussion юеВ

Re: directory for script / logon/ ...etc

 
I.Delic
Super Advisor

directory for script / logon/ ...etc

Hi,

I want to maak one directory to put al my script in. Those script i use to logon on the systeem.( username login, username logof ..etc.)
I want to use this directory for each user.Where i have to make this directory and what are the premissions i have to set.
thank you.
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: directory for script / logon/ ...etc

You could use /usr/local/bin or you could create a location of your own choosing. We use something called /apps/bin/shared

dr-xr-xr-x 2 root sys 2048 Jul 14 10:04 /apps/bin/shared


Pete


Pete
Umapathy S
Honored Contributor

Re: directory for script / logon/ ...etc

Nothing more to say. As Pete suggested you can go ahead with that. I use
/usr/local/shared. Inside shared you will have bin, lib and doc dirs.

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
I.Delic
Super Advisor

Re: directory for script / logon/ ...etc

Hi Pete,


Can you be little more specific about making this directory. i'm not so good with unix. Do i have to do this:
mkdir /apps/
cd /apps
mkdir bin
cd bin
mkdir share
There i have to put al my script.
cd /
chmod 555 apps

is this correct ?


Thank you
Kevin O'Donovan
Regular Advisor

Re: directory for script / logon/ ...etc

Hi,

assuming there's enough space in the filesystem you decide to put this directory in (check by running 'bdf' - will tell you how much space is free in the filesystems).

Once you have enough space:
cd /whereyouwanttocreatedirectory
mkdir yourdirname
chmod 755 yourdirname

and you're sorted, the 7 allows the user (i.e. you) who created it to put scripts into the directory, the 5s give the group and other users read and execute permission on the directory.

e.g. you want to create a directory say /usr/local/scripts:

cd /usr/local
mkdir scripts
chmod 755 scripts

and your done.

hope that helps,
Kevin.
Kevin O'Donovan
Regular Advisor

Re: directory for script / logon/ ...etc

Hi,

assuming there's enough space in the filesystem you decide to put this directory in (check by running 'bdf' - will tell you how much space is free in the filesystems).

Once you have enough space:
cd /whereyouwanttocreatedirectory
mkdir yourdirname
chmod 755 yourdirname

and you're sorted, the 7 allows the user (i.e. you) who created it to put scripts into the directory, the 5s give the group and other users read and execute permission on the directory.

e.g. you want to create a directory say /usr/local/scripts:

cd /usr/local
mkdir scripts
chmod 755 scripts

and you're done.

hope that helps,
Kevin.
Rita C Workman
Honored Contributor

Re: directory for script / logon/ ...etc

Or you simply could allow the users to use their /home/ directory that was probably created when their login id was set up.
Put your scripts in /usr/local/shared giving it 775 permissions. And maybe even include /usr/local/shared in their PATH stmt in their accounts. Or if everybody is going to need this then just include it in the PATH statement of /etc/profile.

Just a thought,
Rita
Pete Randall
Outstanding Contributor

Re: directory for script / logon/ ...etc

Sorry for the delay - yes, your steps are correct. We chmod (555) the higher level directories (/apps and /bin) as well, so that we can control what gets put into production.

I would suggest not going with the home directories idea as this can lead to a maintenance nightmare if you have to make a change to several scripts - finding them is much easier if all your scripts end up in one location.


Pete


Pete