1833830 Members
2071 Online
110063 Solutions
New Discussion

/dev/lan1 permissions

 
SOLVED
Go to solution
jerry1
Super Advisor

/dev/lan1 permissions

Has anyone seen /dev/lan1 permissions change
after reboot from 666 to 600.
What causes this?
9 REPLIES 9
G. Vrijhoeven
Honored Contributor
Solution

Re: /dev/lan1 permissions

Hi,

Did other device files have the same problem?
I am clueless.
When a server reboots it does an ioscan and a insf to create device files.
I never seen this but maybe the umask of the server changed?
Is it not possible the device file was altered before the reboot?


Gideon

Sridhar Bhaskarla
Honored Contributor

Re: /dev/lan1 permissions

Hi,

As per the init script /sbin/init.d/maclan_init, it does create and then change the permissions for btlan3 and lan2 devices. But I don't think it is going to cause any problem.

Look at that script for more details.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: /dev/lan1 permissions

Hi (Again),

YOu can reproduce the problem by changing the permissions on /dev/lan1 to somethingelse and then run the script with 'start' argument. The permissions should be reset back to 600.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeff Schussele
Honored Contributor

Re: /dev/lan1 permissions

Hi Jerry,

I'm not certain, but I think the driver & whether the instance is in use or not play a role.
I'm looking at several identical Ns that have unused Gig-E (gelan) fibre cards & they are 600 root/sys. It also has a couple unused 10/100 TX (btlan) & THEY are 666 bin/bin.

So I guess the questions are - did this system reinstance the lans at bootup and is lan1 now unused & unplumbed? And what type card is it & what driver is it using?

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
jerry1
Super Advisor

Re: /dev/lan1 permissions

The problem is that we have a software
package that uses the MAC address of that
lan interface even though it is not used.

This is scary. I found a fixlan0 script in
rc3.d that I had wrote 3 years before.
I must have needed to fix /dev/lan0 back then
and things changed to lan1 while I was gone.


I told you, touch nothing! But you bunch of
cowboys. (Cosmonaut Lev, Armageddon)
jerry1
Super Advisor

Re: /dev/lan1 permissions

There is a script that does some strange
string checks and chmod 600 lan< >.

See /sbin/rc2.d/S462maclan
Or /sbin/init.d/maclan_init

Why do this at all.

Sridhar Bhaskarla
Honored Contributor

Re: /dev/lan1 permissions

HI Jerry,

How does that software get the lan address and why would it break if the permissions get changed to 600?.

Usually you can get the MAC address by lanscan or lanadmin commands.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeff Schussele
Honored Contributor

Re: /dev/lan1 permissions

$ to doughnuts says it's a licensing scheme & if the perms change it can't get the MAC by a direct query to the NIC.
But as Sri points out lanscan can get all the MACs & it's executable by others.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
jerry1
Super Advisor

Re: /dev/lan1 permissions

I don't know why the application is licensed
to lan1. But what I would like to know is
why there is a strange script to even change
lan1 to 600 in the first place.